SilverFlow.Controls.FloatingWindow.ShowMaximizeButtonPropertyChanged C# (CSharp) Method

ShowMaximizeButtonPropertyChanged() private static method

ShowMaximizeButtonProperty PropertyChangedCallback call back static function.
private static ShowMaximizeButtonPropertyChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void
d DependencyObject FloatingWindow object whose ShowMaximizeButton property is changed.
e DependencyPropertyChangedEventArgs DependencyPropertyChangedEventArgs which contains the old and new values.
return void
        private static void ShowMaximizeButtonPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            FloatingWindow window = (FloatingWindow)d;
            bool visible = window.IsModal ? false : (bool)e.NewValue;

            if (window.maximizeButton != null)
                window.maximizeButton.SetVisible(visible);
        }
FloatingWindow