RadWindow does not show

2 posts, 0 answers
  1. Stav
    Stav avatar
    16 posts
    Member since:
    Dec 2013

    Posted 21 Jul 2016 Link to this post

    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();



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


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





    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



  2. Yana
    Yana avatar
    4604 posts

    Posted 25 Jul 2016 Link to this post

    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.

    Telerik by Progress
    Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Back to Top