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

Lost Focus and Get Focus Event of RadWindow

3 Answers 218 Views
Window
This is a migrated thread and some comments may be shown as answers.
neha
Top achievements
Rank 1
neha asked on 08 Oct 2010, 03:37 AM

Hello,

I have a radwindow as my parent window and a click on the status bar items opens another Radwindow. I need to close the child window when I click anywhere outside the child window.

To do so I have registered the window.GotFocus(..) event on the Parent Window. In this event I am closing the child window. Also I have registered the LostFocus event on tyhe child window But this event gets fired only when I hit a Tab. If I click anywhere outside the Radwindow neither of the event get fired.

Is there any way to resolve this issue?

Thank you for your help.

Neha

3 Answers, 1 is accepted

Sort by
0
Accepted
George
Telerik team
answered on 13 Oct 2010, 02:39 PM
Hi,

I would suggest you to use Deactivated event in order to accomplish this task, not LostFocus. Unfortunately, RadWindow doesn't have such event. That's why, you could get the parent of the RadWindow - Window, and handle Deactivated event of the Window. When the Window is deactivated, you could easily close it.

Attached you can find the sample. I hope this helps!

Kind regards,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
neha
Top achievements
Rank 1
answered on 15 Oct 2010, 02:40 PM

Thanks for you response. I had problem building this Application as it cannot find the reference of two DLLs. (System.Xaml and Microsoft.CSharp )

 

Also I tried to make another application (WpfApplication2.zip) and copied this code and removed the System.Xaml and Microsoft.CSharp reference. But it failed with the following exception:-

'/Telerik.Windows.Controls.Navigation;component/themes/vista/CarouselDataFieldPresenter.xaml' value cannot be assigned to property 'Source' of object 'System.Windows.ResourceDictionary'. Object reference not set to an instance of an object.  Error at object 'System.Windows.ResourceDictionary' in markup file 'Telerik.Windows.Controls.Navigation;component/Themes/GenericVista.xaml'.

 

Can you please let me know the Version of the Binaries that you are using? It would be great if you help me out with this issue.

Thanks,
Neha

0
George
Telerik team
answered on 15 Oct 2010, 05:06 PM

Hello,

I built the application with the binaries from Q2 SP2 WPF 4.0 -  2010_2_0924 version. Could you please specify the version of WPF you use?

Kind regards,
George
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Window
Asked by
neha
Top achievements
Rank 1
Answers by
George
Telerik team
neha
Top achievements
Rank 1
Share this question
or