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

RadWindow does not show

1 Answer 71 Views
Window
This is a migrated thread and some comments may be shown as answers.
Hila
Top achievements
Rank 1
Hila asked on 21 Jul 2016, 08:58 AM

hello Telerik,

I'm trying to use RadWindow AS user control

I'm having a problem with RadWIndow's Show() method.

I was going over your 'Use RadWindow as User Control' explanation and there is a part where is says :

RadWindowControl window = new RadWindowControl();

window.Show();

 

in my code, the way that my RadWIndow (CapabilityLayer) created is from ResourseDictionary:

<ResourseDictionary>

<DataTemplate DataType="{x:Type localVM:CapabilityViewModel}">

<localVIew:CapabilityLayer/>

</DataTemplate>

</ResourseDictionary>

 

I'm only using "new" in order  to create CapabilityViewModel but CapabilityLayer is automatically created, this is why I dont know where to invoke the Show() method I dont have instance to CapabilityLayer.xaml .

at the moment no errors or exceptions it just that the window is not shown

I tried to invoke Show() in the RadWindow's OnLoad event but it still no show.

I tried to find the radwindow through Application.Current.Windows but I didnt find it there.

where is the right place to put this method ? I saw that some time it is recommended to use ShowDIalog() what is the different?  Show() is where RadWindow create or it is only some kind of visibility set?  

thank you

 

 

1 Answer, 1 is accepted

Sort by
0
Yana
Telerik team
answered on 25 Jul 2016, 02:15 PM
Hello Stav,

You cannot place the RadWindow UserControl in XAML as when it is shown it is not in the same visual tree as the parent Window. In your case, you could subscribe to some event (Loaded, for example) and in its handler call the Show() method of the CapabilityLayer ( which I assume is the RadWindow).

I hope this will be helpful.

Regards,
Yana
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Window
Asked by
Hila
Top achievements
Rank 1
Answers by
Yana
Telerik team
Share this question
or