Hourglass.Windows.ThemeManagerWindow.BringToFrontAndActivate C# (CSharp) Method

BringToFrontAndActivate() public method

Brings the window to the front, activates it, and focusses it.
public BringToFrontAndActivate ( ) : void
return void
        public void BringToFrontAndActivate()
        {
            this.BringToFront();
            this.Activate();
        }

Usage Example

コード例 #1
0
        /// <summary>
        /// Invoked when the "Manage themes" <see cref="MenuItem"/> is clicked.
        /// </summary>
        /// <param name="sender">The <see cref="MenuItem"/> where the event handler is attached.</param>
        /// <param name="e">The event data.</param>
        private void ManageThemesMenuItemClick(object sender, RoutedEventArgs e)
        {
            ThemeManagerWindow window = Application.Current.Windows.OfType <ThemeManagerWindow>().FirstOrDefault();

            if (window != null)
            {
                window.SetTimerWindow(this.timerWindow);
                window.BringToFrontAndActivate();
            }
            else
            {
                window = new ThemeManagerWindow(this.timerWindow);
                window.Show();
            }
        }