// called when 'MaximizeOverTaskbarChangedCallback' property changed
        static void MaximizeOverTaskbarChangedCallback(DependencyObject property, DependencyPropertyChangedEventArgs args)
        {
            StandardWindow window = (StandardWindow)property;

            if ((Boolean)args.NewValue)
            {
                window.SourceInitialized -= new EventHandler(window.OnSourceInitialized);
            }
            else
            {
                window.SourceInitialized += new EventHandler(window.OnSourceInitialized);
            }
        }
示例#2
0
        // called when 'Background' property changed
        static void BackgroundChangedCallback(DependencyObject property, DependencyPropertyChangedEventArgs args)
        {
            StandardWindow window = (StandardWindow)property;

            window._contentWindowBackgroundBorder.Background = (Brush)args.NewValue;
        }
示例#3
0
        // called when 'Content' property changed
        static void ContentChangedCallback(DependencyObject property, DependencyPropertyChangedEventArgs args)
        {
            StandardWindow window = (StandardWindow)property;

            window._contentWindowBorder.Child = (UIElement)args.NewValue;
        }