Inheritance: System.Windows.Controls.Button
Ejemplo 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;
            }
        }
Ejemplo 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;
            }
        }