コード例 #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
ファイル: Window.cs プロジェクト: mameolan/Avalonia
        /// <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
ファイル: HtmlLabel.cs プロジェクト: gcardinale/flutnet-sdk
 /// <summary>
 /// Init.
 /// </summary>
 static HtmlLabel()
 {
     BackgroundProperty.OverrideDefaultValue <HtmlLabel>(Brushes.Transparent);
 }
コード例 #6
0
 static CompletionWindowBase()
 {
     BackgroundProperty.OverrideDefaultValue(typeof(CompletionWindowBase), Brushes.White);
 }
コード例 #7
0
 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);
 }