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

ShowRestoreButtonPropertyChanged() private static method

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

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