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

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

4 Answers 173 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 30 Oct 2013, 09:45 PM

Hi,

 

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.

 

Thanks!

4 Answers, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 01 Nov 2013, 09:40 PM
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).



0
Chris
Top achievements
Rank 1
answered on 01 Nov 2013, 09:46 PM

Hi,
Here is the most important parts of the code:

//Main Page contains (in XAML):
<WindowsFormsHost Name="wfhDate" Grid.Row="1"
                    HorizontalAlignment="Center"
                    VerticalAlignment="Stretch">
            <local:WinFormsUserControl  AutoSize="True" Dock="Fill" />
        </WindowsFormsHost>
                 
 
//WinForms UserControl contains:
public WinFormsUserControl()
        {
            InitializeComponent();
            WPFUserControl myWpf = new WPFUserControl();
            myWpf.host = elementHost1;
            myWpf.InitializeComponent();
            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;           
            wnd.ShowDialog();
        }
0
Accepted
Pana
Telerik team
answered on 05 Nov 2013, 07:56 AM
Hello,

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

Regards,
Pana
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
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 >>
0
Chris
Top achievements
Rank 1
answered on 06 Nov 2013, 10:46 PM
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:
http://www.telerik.com/help/wpf/radscheduleview-features-customizing-dialog-windows.html

Thanks for the advice!

Tags
Window
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Pana
Telerik team
Share this question
or