We have MainView that opens several RadWindow, but I need to know which is focused, because may have central command to operata on it.
Can I use RadWindowManager?
Everything else?
3 Answers, 1 is accepted
0
Nasko
Telerik team
answered on 12 Apr 2016, 08:55 AM
Hi Potito,
You could use the RadWindowManager to get the current RadWindow that is active. The manager provides GetWindows method that will return a list of all currently opened Windows and using for example Linq you could find the Window that is currently active:
var activeWindow = RadWindowManager.Current.GetWindows().Where(a => a.IsActiveWindow).FirstOrDefault();
Hope this helps.
Regards,
Nasko
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
I'm developing an application that it has several usercontrol nested (like outlook) and other RadWindow, those RadWindows should be managed such a way as to have a single window activated that it will be linked to subset of RadMenu of the MainWindow.
Then "When the RadWindow is activated, in the Main Window some (relative type) RadMenuItem are activated"
How can I intercept when a RadWindow gets the activation?
0
Accepted
Nasko
Telerik team
answered on 14 Apr 2016, 07:50 AM
Hello Potito,
Form the provided description it seems you are looking for an approach for getting notified when RadWindow is activated. If that is the case you could handle to the Activated event of RadWindow. When the window gets activated the event will be fired and inside it you could implement your desired logic for activations of the MenuItems:
window.Activated += window_Activated;
...
void window_Activated(object sender, EventArgs e)
{
//when the window is a ctivated the event will fire and here you could implement your logic
}
We hope this will help you.
Regards,
Nasko
Telerik
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.