Inheritance: System.Windows.Controls.Button
Esempio n. 1
0
        // hepler function
        protected virtual void OnWindowButtonStateChange(WindowButtonState state, WindowButton button)
        {
            switch (state)
            {
            case WindowButtonState.Normal:
                button.Visibility = Visibility.Visible;
                button.IsEnabled  = true;
                break;

            case WindowButtonState.Disabled:
                button.Visibility = Visibility.Visible;
                button.IsEnabled  = false;
                break;

            case WindowButtonState.None:
                button.Visibility = Visibility.Collapsed;
                break;
            }
        }
Esempio n. 2
0
        // hepler function
        protected virtual void OnWindowButtonStateChange(WindowButtonState state, WindowButton button)
        {
            switch (state)
            {
                case WindowButtonState.Normal:
                    button.Visibility = Visibility.Visible;
                    button.IsEnabled = true;
                    break;

                case WindowButtonState.Disabled:
                    button.Visibility = Visibility.Visible;
                    button.IsEnabled = false;
                    break;

                case WindowButtonState.None:
                    button.Visibility = Visibility.Collapsed;
                    break;
            }
        }