Пример #1
0
        /// <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));
        }
Пример #2
0
        /// <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)));
        }
Пример #3
0
 /// <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));
 }
Пример #4
0
 /// <summary>
 /// Initializes static members of the <see cref="PopupRoot"/> class.
 /// </summary>
 static PopupRoot()
 {
     BackgroundProperty.OverrideDefaultValue(typeof(PopupRoot), Brushes.White);
 }
Пример #5
0
 /// <summary>
 /// Init.
 /// </summary>
 static HtmlLabel()
 {
     BackgroundProperty.OverrideDefaultValue <HtmlLabel>(Brushes.Transparent);
 }
Пример #6
0
 static CompletionWindowBase()
 {
     BackgroundProperty.OverrideDefaultValue(typeof(CompletionWindowBase), Brushes.White);
 }
 static LightDismissOverlayLayer()
 {
     BackgroundProperty.OverrideDefaultValue<LightDismissOverlayLayer>(Brushes.Transparent);
 }
Пример #8
0
 static DateTimePickerPanel()
 {
     FocusableProperty.OverrideDefaultValue <DateTimePickerPanel>(true);
     BackgroundProperty.OverrideDefaultValue <DateTimePickerPanel>(Brushes.Transparent);
     AffectsMeasure <DateTimePickerPanel>(ItemHeightProperty);
 }
Пример #9
0
 /// <summary>
 /// Init.
 /// </summary>
 static HtmlLabel()
 {
     BackgroundProperty.OverrideDefaultValue <HtmlLabel>(Brushes.Transparent);
     AffectsMeasure <HtmlLabel>(AutoSizeProperty, AutoSizeHeightOnlyProperty);
 }
Пример #10
0
        //todo: check out Children.Validate

        static DropZoneStackPanel()
        {
            //making this hit-testable by default
            BackgroundProperty.OverrideDefaultValue <DropZoneStackPanel>(Brushes.Pink);//debug (Brushes.Transparent);
        }
Пример #11
0
 static Window()
 {
     BackgroundProperty.OverrideDefaultValue(typeof(Window), Brushes.White);
     Window.AffectsMeasure(Window.ClientSizeProperty);
 }