Example #1
0
        private void CloseButton_Click(object sender, RoutedEventArgs e)
        {
#if SILVERLIGHT
            IActivityContainer activityContainer = ControlHarness.FindParentActivityContainer(this);

            if (activityContainer != null)
            {
                // For now, just support closing child windows, can be expanded later
                if (activityContainer is ChildWindow)
                {
                    // Probably should incorporate a dirty check at some stage, and notify the user if true?
                    var window = activityContainer as ChildWindow;
                    window.Close();
                }
            }
#elif WPF
            IActivityContainer activityContainer = ControlHarness.FindParentActivityContainer(this);

            if (activityContainer != null)
            {
                // For now, just support closing child windows, can be expanded later
                if (activityContainer is Window)
                {
                    // Probably should incorporate a dirty check at some stage, and notify the user if true?
                    var window = activityContainer as Window;
                    window.Close();
                }
            }
#endif
        }
 private void InitHarness()
 {
     if (_controlHarness == null)
     {
         _controlHarness = new ControlHarness(this);
     }
 }
        /// <summary>
        /// Instantiates a new instance of the BusyIndicatorEx control.
        /// </summary>
        public BusyIndicatorEx()
        {
            DefaultStyleKey          = typeof(BusyIndicatorEx);
            _displayAfterTimer       = new DispatcherTimer();
            _displayAfterTimer.Tick += new EventHandler(DisplayAfterTimerElapsed);

            ActivityContainer = ControlHarness.FindParentActivityContainer(this);
        }
 private void InitHarness()
 {
     if (_controlHarness == null)
         _controlHarness = new ControlHarness(this);
 }
 public void InitHarness()
 {
     _controlHarness = new ControlHarness(this);
 }
 /// <summary>
 /// function to initialize harness
 /// </summary>
 public void InitHarness()
 {
     _controlHarness = new ControlHarness(this);
 }
Example #7
0
 private void InitHarness()
 {
     _controlHarness = new ControlHarness(this);
 }
 private void InitHarness()
 {
     _controlHarness = new ControlHarness(this);
 }
 public override void EndInit()
 {
     base.EndInit();
     _controlHarness = new ControlHarness(this);
 }
 public void intitialise()
 {
     myHarness = new ControlHarness(this);
 }
 private void MessageLabel_Loaded(object sender, RoutedEventArgs e)
 {
     Clear();
     _controlHarness = new ControlHarness(this);
 }
Example #12
0
 private void MessageLabel_Loaded(object sender, RoutedEventArgs e)
 {
     Clear();
     _controlHarness = new ControlHarness(this);
 }
Example #13
0
 public void intitialise()
 {
     myHarness = new ControlHarness(this);
 }