// 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); } }
// called when 'Background' property changed static void BackgroundChangedCallback(DependencyObject property, DependencyPropertyChangedEventArgs args) { StandardWindow window = (StandardWindow)property; window._contentWindowBackgroundBorder.Background = (Brush)args.NewValue; }
// called when 'Content' property changed static void ContentChangedCallback(DependencyObject property, DependencyPropertyChangedEventArgs args) { StandardWindow window = (StandardWindow)property; window._contentWindowBorder.Child = (UIElement)args.NewValue; }