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

Open RadWindow in WindowsForm App

1 Answer 46 Views
Window
This is a migrated thread and some comments may be shown as answers.
Mikel
Top achievements
Rank 1
Mikel asked on 04 Oct 2016, 09:06 AM
Hi!
I need to use that function:

ElementHost.EnableModelessKeyboardInterop(window);

If window object is "RadWindow" type, that method does not accept, becouse that is not of type "System.Windows.Window"
How can I solve it? Or is there other way to open wpf Telerik Window from WindowsForm App?

Thanks!

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 06 Oct 2016, 07:37 AM
Hi Mikel,

RadWindow is hosted in WPF Window and I would suggest getting the parent Window that hosts the RadWindow and passing it as paremeter to the EnableModelessKeyboardInterop method. This should be done after RadWindow is loaded - so you can hook to the Loaded event of get the parent WPF Window as shown below:
void radWind_Loaded(object sender, RoutedEventArgs e)
{
    var radWindow = sender as RadWindow;
    var window = Window.GetWindow(radWindow);
    ElementHost.EnableModelessKeyboardInterop(window);
}

Hope this helps.

Regards,
Nasko
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
Mikel
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or