Window Control Header event

2 posts, 0 answers
  1. gcoleman0828
    gcoleman0828 avatar
    3 posts
    Member since:
    Mar 2010

    Posted 18 Jun 2010 Link to this post

    In other controls I have used in the past, there was a titlebar (or in yourcase header) DialogEventHandler that I could call to do something when someone left clicks the Header to drag the window. The reason I need this is because I have an HTMLplaceholder inside another window and due to the Silveright/htmlplaceholder iframe restrictions, cannot hide itsellf behind the other Window. I would like to set the HTMLplaceholder part not visible when the other window is selected... Can someone please point me where I should be looking for this if there is such a thing? I tried the Drag Events, but these do not seem to trigger

    Thanks in advance

    Added information..... I seem not to be able to use the GotFocus events at all for some reason... I have a breakpoint and it is never even hitting the GotFocus event??  Trying to do GotFocused on the  Rad Window with Silverlight Header in Code below...

    Code :

    using System;  
    using System.Collections.Generic;  
    using System.Linq;  
    using System.Net;  
    using System.Windows;  
    using System.Windows.Controls;  
    using System.Windows.Documents;  
    using System.Windows.Input;  
    using System.Windows.Media;  
    using System.Windows.Media.Animation;  
    using System.Windows.Shapes;  
    using Telerik.Windows.Controls;  
    namespace RadControlsSilverlightApp1  
        public partial class MainPage : UserControl  
            #region GLOBALS  
            RadHtmlPlaceholder GoogleHolder = new RadHtmlPlaceholder();  
            RadWindow GoogleWindow = new RadWindow();  
            RadWindow Silverlight = new RadWindow();  
            public MainPage()  
            private void button1_Click(object sender, RoutedEventArgs e)  
            private void RadControlbutton_Click(object sender, RoutedEventArgs e)  
                // Make placeholder  
                GoogleHolder.Height = Double.NaN;  
                GoogleHolder.Width = Double.NaN;  
                GoogleHolder.SourceUrl = new Uri("");  
                //Make Rad Control  
                GoogleWindow.Content = GoogleHolder;  
                GoogleWindow.Header = "Google Demo";  
                GoogleWindow.Height = 300;  
                GoogleWindow.Width = 300;  
                //Make Rad Control  
                Silverlight.Content = "TEsting 123";  
                Silverlight.Header = "Silverlight Demo";  
                Silverlight.Height = 300;  
                Silverlight.Width = 300;  
                Silverlight.GotFocus += new RoutedEventHandler(Silverlight_GotFocus);  
            void Silverlight_GotFocus(object sender, RoutedEventArgs e)  
                GoogleWindow.Visibility = Visibility.Collapsed;  
  2. George
    George avatar
    1332 posts

    Posted 23 Jun 2010 Link to this post

    Hi gcoleman0828,

    Thank you for contacting us.

    You can try using Activated event:

    Activated - occurs each time the RadWindow gets active. The event handler receives two arguments:

    • The sender argument contains the RadWindow. This argument is of type object, but can be cast to the RadWindow type.
    • An EventArgs object.
    You can also use IsActiveWindow property - Gets a value indicating whether this instance is active.

    I hope this information helps. I will be glad to assist you further.

    Kind regards,
    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