Ejemplo n.º 1
0
        static CommandBar()
        {
            IsOpenProperty = DependencyProperty.Register("IsOpen", typeof(bool), typeof(CommandBar),
                                                         new FrameworkPropertyMetadata(false,
                                                                                       FrameworkPropertyMetadataOptions.BindsTwoWayByDefault |
                                                                                       FrameworkPropertyMetadataOptions.AffectsRender, OnIsOpenChanged));
            IsStickyProperty = DependencyProperty.Register("IsSticky", typeof(bool), typeof(CommandBar),
                                                           new FrameworkPropertyMetadata(false,
                                                                                         FrameworkPropertyMetadataOptions.BindsTwoWayByDefault));
            ClosedDisplayModeProperty = DependencyProperty.Register("ClosedDisplayMode", typeof(BarClosedDisplayMode), typeof(CommandBar),
                                                                    new FrameworkPropertyMetadata(BarClosedDisplayMode.Compact,
                                                                                                  FrameworkPropertyMetadataOptions.BindsTwoWayByDefault |
                                                                                                  FrameworkPropertyMetadataOptions.AffectsRender, OnCloseDisplayModeChanged));
            TemplateSettingsProperty = DependencyProperty.Register("TemplateSettings", typeof(CommandBarTemplateSettings),
                                                                   typeof(CommandBar), new PropertyMetadata(null));
            PlaceProperty = DependencyProperty.Register("Place", typeof(CommandPlace), typeof(CommandBar),
                                                        new FrameworkPropertyMetadata(CommandPlace.Bottom,
                                                                                      FrameworkPropertyMetadataOptions.AffectsRender,
                                                                                      OnPlaceChanged));
            HeightProperty.OverrideMetadata(typeof(CommandBar), new FrameworkPropertyMetadata(40d,
                                                                                              FrameworkPropertyMetadataOptions.AffectsRender));

            FocusManager.IsFocusScopeProperty.OverrideMetadata(typeof(CommandBar), new FrameworkPropertyMetadata(true));
            KeyboardNavigation.TabNavigationProperty.OverrideMetadata(typeof(CommandBar), new FrameworkPropertyMetadata(KeyboardNavigationMode.Cycle));

            DefaultStyleKeyProperty.OverrideMetadata(typeof(CommandBar), new FrameworkPropertyMetadata(typeof(CommandBar)));
        }
Ejemplo n.º 2
0
        static BottomWallpaperRenderer()
        {
            Type ownerType = typeof(BottomWallpaperRenderer);

            IsEnabledProperty
            .OverrideMetadata(ownerType, new FrameworkPropertyMetadata(false, OnIsEnabledChanged));

            RenderToolFactory.RegisterTool <PenTool, Pen>
                (key => new Pen(new SolidColorBrush(key.Color)
            {
                Opacity = key.Opacity
            },
                                key.Width));

            RenderToolFactory.RegisterTool <SolidColorBrushTool, Brush>
                (key => new SolidColorBrush(key.Color)
            {
                Opacity = key.Opacity
            });

            RenderToolFactory.RegisterTool <LinearGradientBrushTool, Brush>
                (key => new LinearGradientBrush(key.ColorA, key.ColorB, key.Angle)
            {
                Opacity = key.Opacity
            });

            ClipToBoundsProperty.OverrideMetadata(ownerType,
                                                  new FrameworkPropertyMetadata(true, null, (o, value) => true));
            WidthProperty.OverrideMetadata(ownerType,
                                           new FrameworkPropertyMetadata((double)BOT_SCR_WIDTH, null, (o, value) => (double)BOT_SCR_WIDTH));
            HeightProperty.OverrideMetadata(ownerType,
                                            new FrameworkPropertyMetadata((double)BOT_SCR_HEIGHT, null, (o, value) => (double)BOT_SCR_HEIGHT));
        }
        static ManagedContent()
        {
            //This OverrideMetadata call tells the system that this element wants to provide a style that is different than its base class.
            //This style is defined in themes\generic.xaml
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(typeof(ManagedContent)));

            WidthProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(double.NaN, null, new CoerceValueCallback(
                                                                                                     (s, v) =>
            {
                if (!DesignerProperties.GetIsInDesignMode(s as DependencyObject))
                {
                    return(double.NaN);
                }

                return(v);
            })));
            HeightProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(double.NaN, null, new CoerceValueCallback(
                                                                                                      (s, v) =>
            {
                if (!DesignerProperties.GetIsInDesignMode(s as DependencyObject))
                {
                    return(double.NaN);
                }

                return(v);
            })));

            FocusableProperty.OverrideMetadata(typeof(ManagedContent), new FrameworkPropertyMetadata(true));
        }
Ejemplo n.º 4
0
 static StyleDialog()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(StyleDialog), new FrameworkPropertyMetadata(typeof(StyleDialog)));
     ContentProperty.OverrideMetadata(typeof(StyleDialog), new FrameworkPropertyMetadata(new PropertyChangedCallback(Changed)));
     WidthProperty.OverrideMetadata(typeof(StyleDialog), new FrameworkPropertyMetadata(new PropertyChangedCallback(Changed)));
     HeightProperty.OverrideMetadata(typeof(StyleDialog), new FrameworkPropertyMetadata(new PropertyChangedCallback(Changed)));
 }
Ejemplo n.º 5
0
        static ACMButton()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(ACMButton), new FrameworkPropertyMetadata(typeof(ACMButton)));

            WidthProperty.OverrideMetadata(typeof(ACMButton), new FrameworkPropertyMetadata(double.NaN, null, OnWithOrHeightCoerceCallback));
            HeightProperty.OverrideMetadata(typeof(ACMButton), new FrameworkPropertyMetadata(double.NaN, null, OnWithOrHeightCoerceCallback));
        }
Ejemplo n.º 6
0
 /// <summary>
 /// Static constructor.  The OverrideMetadata calls can only happen in this constructor.  They will cause undefined
 /// behavior if run elsewhere (and from C we all know undefined behavior is meh).
 /// </summary>
 static Compass()
 {
     // Calculations that need to occur when default dependency properties change.
     HeightProperty.OverrideMetadata(typeof(Compass), new FrameworkPropertyMetadata(0.0, HeightChanged));
     WidthProperty.OverrideMetadata(typeof(Compass), new FrameworkPropertyMetadata(0.0, WidthChanged));
     FontSizeProperty.OverrideMetadata(typeof(Compass), new FrameworkPropertyMetadata(20.0, FontSizeChanged));
 }
Ejemplo n.º 7
0
    static Window()
    {
        WidthProperty.OverrideMetadata(typeof(Window),
                                       new FrameworkPropertyMetadata(float.NaN, OnWidthChanged));

        HeightProperty.OverrideMetadata(typeof(Window),
                                        new FrameworkPropertyMetadata(float.NaN, OnHeightChanged));
    }
Ejemplo n.º 8
0
 static UnreadTip()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(typeof(UnreadTip)));
     ClipToBoundsProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(true));
     VisibilityProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(Visibility.Collapsed));
     HeightProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(10.00));
     WidthProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(15.00));
 }
Ejemplo n.º 9
0
 static CountdownRect()
 {
     WidthProperty.OverrideMetadata(typeof(CountdownRect),
                                    new FrameworkPropertyMetadata((o, e) => ((CountdownRect)o).GeometryChanged()));
     HeightProperty.OverrideMetadata(typeof(CountdownRect),
                                     new FrameworkPropertyMetadata((o, e) => ((CountdownRect)o).GeometryChanged()));
     StrokeLineJoinProperty.OverrideMetadata(typeof(CountdownRect),
                                             new FrameworkPropertyMetadata(PenLineJoin.Round));
 }
Ejemplo n.º 10
0
 static RowDefinitionExtended()
 {
     VisibleProperty = DependencyProperty.Register("Visible", typeof(bool), typeof(RowDefinitionExtended),
                                                   new PropertyMetadata(true, new PropertyChangedCallback(OnVisibleChanged)));
     HeightProperty.OverrideMetadata(typeof(RowDefinitionExtended),
                                     new FrameworkPropertyMetadata(new GridLength(1, GridUnitType.Star), null, new CoerceValueCallback(CoerceHeight)));
     MinHeightProperty.OverrideMetadata(typeof(RowDefinitionExtended),
                                        new FrameworkPropertyMetadata((double)0, null, new CoerceValueCallback(CoerceMinHeight)));
 }
Ejemplo n.º 11
0
        //--------------------------------------------------------------
        #region Creation & Cleanup
        //--------------------------------------------------------------

        /// <summary>
        /// Initializes static members of the <see cref="Icon"/> class.
        /// </summary>
        static Icon()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(Icon), new FrameworkPropertyMetadata(typeof(Icon)));

            // Add PropertyChangedCallbacks for IsEnabled and Source.
            IsEnabledProperty.OverrideMetadata(typeof(Icon), new FrameworkPropertyMetadata(Boxed.BooleanTrue, OnImageEffectChanged));
            WidthProperty.OverrideMetadata(typeof(Icon), new FrameworkPropertyMetadata(16.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
            HeightProperty.OverrideMetadata(typeof(Icon), new FrameworkPropertyMetadata(16.0, FrameworkPropertyMetadataOptions.AffectsMeasure));
        }
Ejemplo n.º 12
0
 static WhiteKey()
 {
     BackgroundProperty.OverrideMetadata(typeof(WhiteKey), new FrameworkPropertyMetadata(Brushes.Snow));
     DefaultStyleKeyProperty.OverrideMetadata(typeof(WhiteKey), new FrameworkPropertyMetadata(typeof(WhiteKey)));
     HeightProperty.OverrideMetadata(typeof(WhiteKey), new FrameworkPropertyMetadata(150.0));
     MarginProperty.OverrideMetadata(typeof(WhiteKey), new FrameworkPropertyMetadata(new Thickness(-2.0, 0, 0.0, 0.0)));
     WidthProperty.OverrideMetadata(typeof(WhiteKey), new FrameworkPropertyMetadata(23.0));
     //TextBlock.FontSizeProperty.OverrideMetadata(typeof(WhiteKey), new FrameworkPropertyMetadata(10.0));
 }
Ejemplo n.º 13
0
 static UnreadTip()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(typeof(UnreadTip)));
     ClipToBoundsProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(true));
     VisibilityProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(Visibility.Collapsed));
     HeightProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(10.00));
     WidthProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(15.00));
     FontSizeProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(8.00));
     BackgroundProperty.OverrideMetadata(typeof(UnreadTip), new FrameworkPropertyMetadata(new SolidColorBrush(Colors.Red)));
 }
Ejemplo n.º 14
0
 static IconImage()
 {
     IsEnabledProperty.OverrideMetadata(typeof(IconImage),
                                        new FrameworkPropertyMetadata(true, new PropertyChangedCallback(
                                                                          OnGrayImage)));
     WidthProperty.OverrideMetadata(typeof(IconImage),
                                    new FrameworkPropertyMetadata(16d));
     HeightProperty.OverrideMetadata(typeof(IconImage),
                                     new FrameworkPropertyMetadata(16d));
 }
Ejemplo n.º 15
0
        static BlankRect()
        {
            WidthProperty.OverrideMetadata(typeof(BlankRect),
                                           new FrameworkPropertyMetadata((o, e) => ((BlankRect)o).UpdateGeometry()));

            HeightProperty.OverrideMetadata(typeof(BlankRect),
                                            new FrameworkPropertyMetadata((o, e) => ((BlankRect)o).UpdateGeometry()));

            StrokeLineJoinProperty.OverrideMetadata(typeof(BlankRect),
                                                    new FrameworkPropertyMetadata(PenLineJoin.Round));
        }
Ejemplo n.º 16
0
 static BlackKey()
 {
     BackgroundProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(Brushes.Black));
     DefaultStyleKeyProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(typeof(BlackKey)));
     ForegroundProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(Brushes.White));
     HeightProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(95.0));
     MarginProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(new Thickness(-100.0, 0, -100.0, 0.0)));
     VerticalAlignmentProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(VerticalAlignment.Top));
     WidthProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(11.0));
     Panel.ZIndexProperty.OverrideMetadata(typeof(BlackKey), new FrameworkPropertyMetadata(1));
 }
Ejemplo n.º 17
0
        static DataGridColumnFloatingHeader()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DataGridColumnFloatingHeader), new FrameworkPropertyMetadata(typeof(DataGridColumnFloatingHeader)));
            WidthProperty.OverrideMetadata(
                typeof(DataGridColumnFloatingHeader),
                new FrameworkPropertyMetadata(new PropertyChangedCallback(OnWidthChanged), new CoerceValueCallback(OnCoerceWidth)));

            HeightProperty.OverrideMetadata(
                typeof(DataGridColumnFloatingHeader),
                new FrameworkPropertyMetadata(new PropertyChangedCallback(OnHeightChanged), new CoerceValueCallback(OnCoerceHeight)));
        }
Ejemplo n.º 18
0
        public Compass()
        {
            this.InitializeComponent();
            this.DataContext = this;

            // Calculations that need to occur when default dependency properties change.
            HeightProperty.OverrideMetadata(typeof(Compass), new FrameworkPropertyMetadata(0.0, HeightChanged));
            WidthProperty.OverrideMetadata(typeof(Compass), new FrameworkPropertyMetadata(0.0, WidthChanged));
            FontSizeProperty.OverrideMetadata(typeof(Compass), new FrameworkPropertyMetadata(20.0, FontSizeChanged));

            this.Angle = 0;
        }
Ejemplo n.º 19
0
 static LegacyBorderWindow()
 {
     //DefaultStyleKeyProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(typeof(BorderWindow)));
     WindowStyleProperty.OverrideMetadata(typeof(LegacyBorderWindow), new FrameworkPropertyMetadata(WindowStyle.None));
     ShowInTaskbarProperty.OverrideMetadata(typeof(LegacyBorderWindow), new FrameworkPropertyMetadata(false));
     AllowsTransparencyProperty.OverrideMetadata(typeof(LegacyBorderWindow), new FrameworkPropertyMetadata(true));
     ShowActivatedProperty.OverrideMetadata(typeof(LegacyBorderWindow), new FrameworkPropertyMetadata(false));
     // override to make border less visible initially for slow machines
     //WindowStateProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(WindowState.Minimized));
     WidthProperty.OverrideMetadata(typeof(LegacyBorderWindow), new FrameworkPropertyMetadata(1d));
     HeightProperty.OverrideMetadata(typeof(LegacyBorderWindow), new FrameworkPropertyMetadata(1d));
 }
Ejemplo n.º 20
0
        public DeckView()
        {
            InitializeComponent();

            // force default size for instances
            if (!hasMetadataOverride)
            {
                hasMetadataOverride = true;
                WidthProperty.OverrideMetadata(typeof(DeckView), new FrameworkPropertyMetadata((double)280));
                HeightProperty.OverrideMetadata(typeof(DeckView), new FrameworkPropertyMetadata((double)50));
            }
        }
Ejemplo n.º 21
0
 /// <summary>
 /// Initialises static members of the <see cref="Icon"/> class.
 /// </summary>
 static Icon()
 {
     DefaultStyleKeyProperty.OverrideMetadata(
         typeof(Icon),
         new FrameworkPropertyMetadata(typeof(Icon)));
     HeightProperty.OverrideMetadata(
         typeof(Icon),
         new FrameworkPropertyMetadata(new PropertyChangedCallback(OnHeightPropertyChanged)));
     WidthProperty.OverrideMetadata(
         typeof(Icon),
         new FrameworkPropertyMetadata(new PropertyChangedCallback(OnWidthPropertyChanged)));
 }
Ejemplo n.º 22
0
 static BorderWindow()
 {
     DefaultStyleKeyProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(typeof(BorderWindow)));
     WindowStyleProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(WindowStyle.None));
     ShowInTaskbarProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(false));
     AllowsTransparencyProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(true));
     ShowActivatedProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(false));
     ResizeModeProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(ResizeMode.NoResize));
     BorderBrushProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(Brushes.DimGray));
     // override to make border less visible initially for slow machines
     WidthProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(1d));
     HeightProperty.OverrideMetadata(typeof(BorderWindow), new FrameworkPropertyMetadata(1d));
 }
Ejemplo n.º 23
0
        static TopWallpaperRenderer()
        {
            ScreenArea = new Rect(0, 0, 412, 240);

            RenderToolFactory.RegisterTool <PenTool, Pen>
                (key => new Pen(new SolidColorBrush(key.Color)
            {
                Opacity = key.Opacity
            },
                                key.Width));

            RenderToolFactory.RegisterTool <SolidColorBrushTool, Brush>
                (key => new SolidColorBrush(key.Color)
            {
                Opacity = key.Opacity
            });

            RenderToolFactory.RegisterTool <LinearGradientBrushTool, Brush>
                (key => new LinearGradientBrush(key.ColorA, key.ColorB, key.Angle)
            {
                Opacity = key.Opacity
            });

            RenderToolFactory.RegisterTool <ImageBrushTool, Brush>
                (key => new ImageBrush(key.Image)
            {
                TileMode      = key.Mode,
                ViewportUnits = key.ViewportUnits,
                Viewport      = key.Viewport,
                Opacity       = key.Opacity
            });

            Type ownerType = typeof(TopWallpaperRenderer);

            IsEnabledProperty
            .OverrideMetadata(ownerType, new FrameworkPropertyMetadata(false, OnIsEnabledChanged));

            ClipToBoundsProperty.OverrideMetadata(ownerType,
                                                  new FrameworkPropertyMetadata(true, null, (o, value) => true));
            WidthProperty.OverrideMetadata(ownerType,
                                           new FrameworkPropertyMetadata(412.0, null, (o, value) => 412.0));
            HeightProperty.OverrideMetadata(ownerType,
                                            new FrameworkPropertyMetadata(240.0, null, (o, value) => 240.0));

            /*
             * EffectProperty.OverrideMetadata(ownerType,
             *  new FrameworkPropertyMetadata(default(WarpEffect),
             *      null,
             *      (o, value) => ((TopWallpaperRenderer) o).GetWarpEffectInstance()));
             */
        }
Ejemplo n.º 24
0
        static DataGridColumnHeader()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(typeof(DataGridColumnHeader)));

            ContentProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(OnNotifyPropertyChanged, OnCoerceContent));
            ContentTemplateProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceContentTemplate));
            ContentTemplateSelectorProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceContentTemplateSelector));
            ContentStringFormatProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStringFormat));
            StyleProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(null, OnNotifyPropertyChanged, OnCoerceStyle));
            HeightProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(OnNotifyPropertyChanged, OnCoerceHeight));

            FocusableProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(false));
            ClipProperty.OverrideMetadata(typeof(DataGridColumnHeader), new FrameworkPropertyMetadata(null, OnCoerceClip));
        }
        /// <summary>
        ///     Instantiates global information.
        /// </summary>
        static DataGridCellsPresenter()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(DataGridCellsPresenter), new FrameworkPropertyMetadata(typeof(DataGridCellsPresenter)));
            ItemsPanelProperty.OverrideMetadata(typeof(DataGridCellsPresenter), new FrameworkPropertyMetadata(new ItemsPanelTemplate(new FrameworkElementFactory(typeof(DataGridCellsPanel)))));
            FocusableProperty.OverrideMetadata(typeof(DataGridCellsPresenter), new FrameworkPropertyMetadata(false));

            HeightProperty.OverrideMetadata(typeof(DataGridCellsPresenter), new FrameworkPropertyMetadata(OnNotifyHeightPropertyChanged, OnCoerceHeight));
            MinHeightProperty.OverrideMetadata(typeof(DataGridCellsPresenter), new FrameworkPropertyMetadata(OnNotifyHeightPropertyChanged, OnCoerceMinHeight));

            VirtualizingStackPanel.IsVirtualizingProperty.OverrideMetadata(
                typeof(DataGridCellsPresenter),
                new FrameworkPropertyMetadata(false, new PropertyChangedCallback(OnIsVirtualizingPropertyChanged), new CoerceValueCallback(OnCoerceIsVirtualizingProperty)));
            VirtualizingStackPanel.VirtualizationModeProperty.OverrideMetadata(typeof(DataGridCellsPresenter), new FrameworkPropertyMetadata(VirtualizationMode.Recycling));
        }
        static DataGridColumnDropSeparator()
        {
            DefaultStyleKeyProperty.OverrideMetadata(
                typeof(DataGridColumnDropSeparator),
                new FrameworkPropertyMetadata(DataGridColumnHeader.ColumnHeaderDropSeparatorStyleKey));

            WidthProperty.OverrideMetadata(
                typeof(DataGridColumnDropSeparator),
                new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceWidth)));

            HeightProperty.OverrideMetadata(
                typeof(DataGridColumnDropSeparator),
                new FrameworkPropertyMetadata(null, new CoerceValueCallback(OnCoerceHeight)));
        }
Ejemplo n.º 27
0
        static RowDefinitionCollapsable()
        {
            HeightProperty.OverrideMetadata(
                typeof(RowDefinitionCollapsable),
                new FrameworkPropertyMetadata(
                    new GridLength(1, GridUnitType.Star),
                    null,
                    (d, v) => ((RowDefinitionCollapsable)d).Visible ? v : new GridLength(0)));


            MinHeightProperty.OverrideMetadata(
                typeof(RowDefinitionCollapsable),
                new FrameworkPropertyMetadata(0d, null, (d, v) => ((RowDefinitionCollapsable)d).Visible ? v : 0d));
        }
Ejemplo n.º 28
0
        static TimeScale()
        {
            WidthProperty.OverrideMetadata(typeof(TimeScale), new FrameworkPropertyMetadata(Double.NaN));
            HeightProperty.OverrideMetadata(typeof(TimeScale), new FrameworkPropertyMetadata(30d));

            ClipToBoundsProperty.OverrideMetadata(typeof(TimeScale), new FrameworkPropertyMetadata(true));
            ForegroundProperty.OverrideMetadata(typeof(TimeScale), new FrameworkPropertyMetadata(Brushes.Gray));
            BackgroundProperty.OverrideMetadata(typeof(TimeScale), new FrameworkPropertyMetadata(Brushes.Transparent));

            IntervalTextColorProperty = DependencyProperty.Register("IntervalTextColor", typeof(Brush), typeof(TimeScale),
                                                                    new FrameworkPropertyMetadata {
                DefaultValue = Brushes.Gray, AffectsRender = true
            });

            DefaultStyleKeyProperty.OverrideMetadata(typeof(TimeScale),
                                                     new FrameworkPropertyMetadata(typeof(TimeScale)));
        }
Ejemplo n.º 29
0
        static JumpTopAppBar()
        {
            DefaultStyleKeyProperty
            .OverrideMetadata(typeof(JumpTopAppBar), new FrameworkPropertyMetadata(typeof(JumpTopAppBar)));
            BackgroundProperty
            .OverrideMetadata(typeof(JumpTopAppBar), new FrameworkPropertyMetadata(Brushes.Transparent));
            HeightProperty
            .OverrideMetadata(typeof(JumpTopAppBar), new FrameworkPropertyMetadata(Convert.ToDouble(40)));
            HorizontalAlignmentProperty
            .OverrideMetadata(typeof(JumpTopAppBar), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch));
            VerticalAlignmentProperty
            .OverrideMetadata(typeof(JumpTopAppBar), new FrameworkPropertyMetadata(VerticalAlignment.Top));

            /////////////////////////////////////////////////////////////////////////////////
            /// Routed Events:
            /////////////////////////////////////////////////////////////////////////////////
            EventManager.RegisterClassHandler(typeof(JumpTopAppBar), SizeChangedEvent, new RoutedEventHandler(OnLoaded));
        }
 static CompletionWindow()
 {
     WidthProperty.OverrideMetadata(typeof(CompletionWindow), new FrameworkPropertyMetadata(200.0));
     HeightProperty.OverrideMetadata(typeof(CompletionWindow), new FrameworkPropertyMetadata(120.0));
 }