Lost Focus and Get Focus Event of RadWindow

4 posts, 1 answers
  1. neha
    neha avatar
    5 posts
    Member since:
    May 2010

    Posted 07 Oct 2010 Link to this post

    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

  2. Answer
    George
    Admin
    George avatar
    1332 posts

    Posted 13 Oct 2010 Link to this post

    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
  3. UI for WPF is Visual Studio 2017 Ready
  4. neha
    neha avatar
    5 posts
    Member since:
    May 2010

    Posted 15 Oct 2010 Link to this post

    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

  5. George
    Admin
    George avatar
    1332 posts

    Posted 15 Oct 2010 Link to this post

    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
Back to Top