This is a migrated thread and some comments may be shown as answers.

Window and DefaultStyleKey

1 Answer 78 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rajmund
Top achievements
Rank 1
Rajmund asked on 16 Jan 2009, 10:08 AM

I have simple code listed below. It doesnt work and I dont know why. After calling ShowDialog() method window doesnt appear. 

public class MessageBox : RadWindow

{

public MessageBox()
{
this.DefaultStyleKey = typeof(MessageBox);

  }

}

generic.xaml

<Style TargetType="windows:MessageBox">
<Setter Property="Background" Value="Black" />

</Style>


1 Answer, 1 is accepted

Sort by
0
Hristo Borisov
Telerik team
answered on 16 Jan 2009, 02:00 PM
Hello Rajmund,

Whenever you explicitly set the DeafultStyleKey of a control, you are overriding the inherited one, and unless you don't create a control template in our style that has all required parts required from the code-behind logic of RadWindow, you will not be able to use it. That is why we are working on enabling our controls to work in Blend in which you can change the control template on the fly.

Best wishes,
Hristo Borisov
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
Rajmund
Top achievements
Rank 1
Answers by
Hristo Borisov
Telerik team
Share this question
or