/// <summary> /// Initializes static members of the <see cref="Window"/> class. /// </summary> static Window() { BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White); TitleProperty.Changed.AddClassHandler <Window>((s, e) => s.PlatformImpl?.SetTitle((string)e.NewValue)); HasSystemDecorationsProperty.Changed.AddClassHandler <Window>( (s, e) => s.PlatformImpl?.SetSystemDecorations((bool)e.NewValue)); ShowInTaskbarProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.ShowTaskbarIcon((bool)e.NewValue)); IconProperty.Changed.AddClassHandler <Window>((s, e) => s.PlatformImpl?.SetIcon(((WindowIcon)e.NewValue).PlatformImpl)); }
/// <summary> /// Initializes static members of the <see cref="Window"/> class. /// </summary> static Window() { BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White); TitleProperty.Changed.AddClassHandler <Window>((s, e) => s.PlatformImpl?.SetTitle((string)e.NewValue)); ShowInTaskbarProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.ShowTaskbarIcon((bool)e.NewValue)); IconProperty.Changed.AddClassHandler <Window>((s, e) => s.PlatformImpl?.SetIcon(((WindowIcon)e.NewValue)?.PlatformImpl)); CanResizeProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.CanResize((bool)e.NewValue)); WindowStateProperty.Changed.AddClassHandler <Window>( (w, e) => { if (w.PlatformImpl != null) { w.PlatformImpl.WindowState = (WindowState)e.NewValue; } }); MinWidthProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.SetMinMaxSize(new Size((double)e.NewValue, w.MinHeight), new Size(w.MaxWidth, w.MaxHeight))); MinHeightProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.SetMinMaxSize(new Size(w.MinWidth, (double)e.NewValue), new Size(w.MaxWidth, w.MaxHeight))); MaxWidthProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.SetMinMaxSize(new Size(w.MinWidth, w.MinHeight), new Size((double)e.NewValue, w.MaxHeight))); MaxHeightProperty.Changed.AddClassHandler <Window>((w, e) => w.PlatformImpl?.SetMinMaxSize(new Size(w.MinWidth, w.MinHeight), new Size(w.MaxWidth, (double)e.NewValue))); }
/// <summary> /// Initializes static members of the <see cref="Window"/> class. /// </summary> static Window() { BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White); TitleProperty.Changed.AddClassHandler <Window>((s, e) => s.PlatformImpl.SetTitle((string)e.NewValue)); }
/// <summary> /// Initializes static members of the <see cref="PopupRoot"/> class. /// </summary> static PopupRoot() { BackgroundProperty.OverrideDefaultValue(typeof(PopupRoot), Brushes.White); }
/// <summary> /// Init. /// </summary> static HtmlLabel() { BackgroundProperty.OverrideDefaultValue <HtmlLabel>(Brushes.Transparent); }
static CompletionWindowBase() { BackgroundProperty.OverrideDefaultValue(typeof(CompletionWindowBase), Brushes.White); }
static LightDismissOverlayLayer() { BackgroundProperty.OverrideDefaultValue<LightDismissOverlayLayer>(Brushes.Transparent); }
static DateTimePickerPanel() { FocusableProperty.OverrideDefaultValue <DateTimePickerPanel>(true); BackgroundProperty.OverrideDefaultValue <DateTimePickerPanel>(Brushes.Transparent); AffectsMeasure <DateTimePickerPanel>(ItemHeightProperty); }
/// <summary> /// Init. /// </summary> static HtmlLabel() { BackgroundProperty.OverrideDefaultValue <HtmlLabel>(Brushes.Transparent); AffectsMeasure <HtmlLabel>(AutoSizeProperty, AutoSizeHeightOnlyProperty); }
//todo: check out Children.Validate static DropZoneStackPanel() { //making this hit-testable by default BackgroundProperty.OverrideDefaultValue <DropZoneStackPanel>(Brushes.Pink);//debug (Brushes.Transparent); }
static Window() { BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White); Window.AffectsMeasure(Window.ClientSizeProperty); }