RadWindow WPF doesn't show up in application running in IE

5 posts, 1 answers
  1. Chris
    Chris avatar
    6 posts
    Member since:
    Dec 2010

    Posted 30 Oct 2013 Link to this post



    I have a WPF application running inside Internet Explorer.  One of the dialogs attempts to open a RadWindow when the user presses a button.  However, the user will never see the RadWindow. I see the same problem with the RadScheduleView, which does not show the edit appointment dialog in a WPF application inside IE, so I'm guessing that it uses RadWindow for this dialog. 
    When I call MyRadWindow.Show() it seems to create the instance, but the Owner property is null. Also, the following call does not detect any windows:




    IList<WindowBase> windows = RadWindowManager.Current.GetWindows();



    Just a note, the Silverlight version of RadWindow works fine in a Silverlight application running in Internet Explorer.



  2. Chris
    Chris avatar
    6 posts
    Member since:
    Dec 2010

    Posted 01 Nov 2013 Link to this post

    I've discovered that the RadWindow is actually being opened but it is hidden behind a WindowsFormsHost.  Here is the exact scenario:

    I have a WPFBrowserApp running in IE with the following hierarchy of child controls:

    n  Main XAML page with WindowsFormsHost containing:

    • WinForms UserControl containing ElementHost containing:
      • WPF UserControl with a button to launch:
        • RadWindow

    I tried to attach a sample VS2012 WPFBrowserApp project that demonstrates this issue, but only images are allowed.  Please let me know if there is another way to submit the sample application.

    The sample application has multiple buttons to launch the RadWindow from different levels in the hierarchy, but in all cases the RadWindow shows up behind the WindowsFormsHost control.  (You can move it around and resize your window to see it or hide it).

  3. DevCraft banner
  4. Chris
    Chris avatar
    6 posts
    Member since:
    Dec 2010

    Posted 01 Nov 2013 Link to this post

    Here is the most important parts of the code:

    //Main Page contains (in XAML):
    <WindowsFormsHost Name="wfhDate" Grid.Row="1"
                <local:WinFormsUserControl  AutoSize="True" Dock="Fill" />
    //WinForms UserControl contains:
    public WinFormsUserControl()
                WPFUserControl myWpf = new WPFUserControl();
                myWpf.host = elementHost1;
                elementHost1.Child = myWpf;
    //child WPF UserControl contains (in XAML):
    <Button Content="RadWindow" HorizontalAlignment="Left" Grid.Row="0" Margin="258,0,0,0" VerticalAlignment="Top" Width="75" Click="Button_Click_1"/>
    //Code behind:
    private void Button_Click_1(object sender, RoutedEventArgs e)
                MyRadWindow wnd = new MyRadWindow();
                //I have tried several variations of assigning an owner, but none of them work:
                //wnd.Owner = Application.Current.MainWindow;           
                //wnd.Owner = this;           
  5. Answer
    Pana avatar
    748 posts

    Posted 05 Nov 2013 Link to this post


    The RadWindow is intended to work within the WPF framework. In your case I would recommend you open a WinForms window.

    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Chris
    Chris avatar
    6 posts
    Member since:
    Dec 2010

    Posted 06 Nov 2013 Link to this post

    Hi Pana,

    Thanks, I will switch to use a WinForms window.  I've found that for the RadScheduleView I can also switch to Window instead of RadWindow and it seems to be working.  See this topic:

    Thanks for the advice!

Back to Top
DevCraft banner