Пример #1
0
        //--------------------------------------------------------------
        #region Dependency Properties & Routed Events
        //--------------------------------------------------------------
        #endregion


        //--------------------------------------------------------------
        #region Creation & Cleanup
        //--------------------------------------------------------------

        /// <summary>
        /// Initializes static members of the <see cref="FloatWindow"/> class.
        /// </summary>
        static FloatWindow()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(FloatWindow), new FrameworkPropertyMetadata(typeof(FloatWindow)));
            ShowInTaskbarProperty.OverrideMetadata(typeof(FloatWindow), new FrameworkPropertyMetadata(Boxed.BooleanFalse));
            WindowStyleProperty.OverrideMetadata(typeof(FloatWindow), new FrameworkPropertyMetadata(WindowStyle.ToolWindow));
            SizeToContentProperty.OverrideMetadata(typeof(FloatWindow), new FrameworkPropertyMetadata(SizeToContent.WidthAndHeight));
        }
Пример #2
0
 static DialogWindow()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(DialogWindow), new FrameworkPropertyMetadata(typeof(DialogWindow)));
     ResizeModeProperty.OverrideMetadata(typeof(DialogWindow), new FrameworkPropertyMetadata(ResizeMode.NoResize, OnResizeModeChanged, OnCoerceResizeMode));
     SizeToContentProperty.OverrideMetadata(typeof(DialogWindow), new FrameworkPropertyMetadata(SizeToContent.WidthAndHeight, OnSizeToContentChanged, OnCoerceSizeToContent));
     WindowStateProperty.OverrideMetadata(typeof(DialogWindow), new FrameworkPropertyMetadata(WindowState.Normal, OnWindowStateChanged, OnCoerceWindowState));
 }
Пример #3
0
 static NotificationWindow()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(typeof(NotificationWindow)));
     WindowStyleProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(WindowStyle.None));
     AllowsTransparencyProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(true));
     BackgroundProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(Brushes.CadetBlue));
     TopmostProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(true));
     ShowInTaskbarProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(false));
     ShowActivatedProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(false));
     SizeToContentProperty.OverrideMetadata(typeof(NotificationWindow), new FrameworkPropertyMetadata(SizeToContent.Manual));
 }
Пример #4
0
        static InfoCardWindow()
        {
            ShowInTaskbarProperty.OverrideMetadata(
                typeof(InfoCardWindow),
                new FrameworkPropertyMetadata(false));

            SizeToContentProperty.OverrideMetadata(
                typeof(InfoCardWindow),
                new FrameworkPropertyMetadata(SizeToContent.WidthAndHeight));

            WindowStyleProperty.OverrideMetadata(
                typeof(InfoCardWindow),
                new FrameworkPropertyMetadata(WindowStyle.None));

            ResizeModeProperty.OverrideMetadata(
                typeof(InfoCardWindow),
                new FrameworkPropertyMetadata(ResizeMode.NoResize));

            AllowsTransparencyProperty.OverrideMetadata(
                typeof(InfoCardWindow),
                new FrameworkPropertyMetadata(true));

            BackgroundProperty.OverrideMetadata(
                typeof(InfoCardWindow),
                new FrameworkPropertyMetadata(Brushes.Transparent));

            EventManager.RegisterClassHandler(
                typeof(InfoCard),
                InfoCard.PinnedEvent,
                (RoutedEventHandler)OnInfoCardPinned);

            EventManager.RegisterClassHandler(
                typeof(InfoCard),
                InfoCard.UnpinnedEvent,
                (RoutedEventHandler)OnInfoCardUnpinned);
        }
Пример #5
0
 set => SetValue(SizeToContentProperty, value);