static MainNavigator() { DefaultStyleKeyProperty.OverrideMetadata(typeof(MainNavigator), new FrameworkPropertyMetadata(typeof(MainNavigator))); MarginProperty.OverrideMetadata(typeof(MainNavigator), new FrameworkPropertyMetadata() { PropertyChangedCallback = OnMarginPropertyChanged }); }
static JumpSideAppBar() { DefaultStyleKeyProperty.OverrideMetadata(typeof(JumpSideAppBar), new FrameworkPropertyMetadata(typeof(JumpSideAppBar))); WidthProperty.OverrideMetadata(typeof(JumpSideAppBar), new FrameworkPropertyMetadata(Convert.ToDouble(48))); HorizontalAlignmentProperty.OverrideMetadata(typeof(JumpSideAppBar), new FrameworkPropertyMetadata(HorizontalAlignment.Left)); VerticalAlignmentProperty.OverrideMetadata(typeof(JumpSideAppBar), new FrameworkPropertyMetadata(VerticalAlignment.Stretch)); MarginProperty.OverrideMetadata(typeof(JumpSideAppBar), new FrameworkPropertyMetadata(new Thickness(0, 40, 0, 0))); EventManager.RegisterClassHandler(typeof(JumpSideAppBar), SizeChangedEvent, new RoutedEventHandler(OnLoaded)); }
static JumpComboBox() { // Specify veritical margins in the root Stackpanel. MarginProperty.OverrideMetadata(typeof(JumpComboBox), new FrameworkPropertyMetadata(new Thickness(0, 4, 4, 4))); HorizontalAlignmentProperty.OverrideMetadata(typeof(JumpComboBox), new FrameworkPropertyMetadata(HorizontalAlignment.Stretch)); VerticalAlignmentProperty.OverrideMetadata(typeof(JumpComboBox), new FrameworkPropertyMetadata(VerticalAlignment.Stretch)); //BackgroundProperty.OverrideMetadata(typeof(JumpComboBox), new FrameworkPropertyMetadata(Brushes.Transparent)); EventManager.RegisterClassHandler(typeof(JumpComboBox), SizeChangedEvent, new RoutedEventHandler(OnSizeChanged)); }
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)); }
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)); }
static OdcExpander() { MarginProperty.OverrideMetadata( typeof(OdcExpander), new FrameworkPropertyMetadata(new Thickness(10, 10, 10, 2))); FocusableProperty.OverrideMetadata(typeof(OdcExpander), new FrameworkPropertyMetadata(false)); DefaultStyleKeyProperty.OverrideMetadata(typeof(OdcExpander), new FrameworkPropertyMetadata(typeof(OdcExpander))); }
static TopAppBar_Navigation() { DefaultStyleKeyProperty .OverrideMetadata(typeof(TopAppBar_Navigation), new FrameworkPropertyMetadata(typeof(TopAppBar_Navigation))); MarginProperty .OverrideMetadata(typeof(TopAppBar_Navigation), new FrameworkPropertyMetadata(new Thickness(4, 4, 4, 4))); BackgroundProperty .OverrideMetadata(typeof(TopAppBar_Navigation), new FrameworkPropertyMetadata(Brushes.Transparent)); ///////////////////////////////////////////////////////////////////////////////// /// Routed Events: ///////////////////////////////////////////////////////////////////////////////// EventManager.RegisterClassHandler(typeof(TopAppBar_Navigation), SizeChangedEvent, new RoutedEventHandler(OnLoad)); }
static TopAppBar_Button() { DefaultStyleKeyProperty .OverrideMetadata(typeof(TopAppBar_Button), new FrameworkPropertyMetadata(typeof(TopAppBar_Button))); MarginProperty .OverrideMetadata(typeof(AppBar_Button), new FrameworkPropertyMetadata(new Thickness(0, 4, 0, 4))); ///////////////////////////////////////////////////////////////////////////////// /// Custom Properties: ///////////////////////////////////////////////////////////////////////////////// m_IconProperty = DependencyProperty.Register(nameof(Icon), typeof(PackIconKind), typeof(Icon), new PropertyMetadata(default(PackIconKind))); ///////////////////////////////////////////////////////////////////////////////// /// Routed Events: ///////////////////////////////////////////////////////////////////////////////// EventManager.RegisterClassHandler(typeof(TopAppBar_Button), SizeChangedEvent, new RoutedEventHandler(OnLoad)); }
// *** Constructors *** static ShadowChrome() { MarginProperty.OverrideMetadata(typeof(ShadowChrome), new FrameworkPropertyMetadata(new Thickness(0, 0, 4, 4))); CreateBrushes(); }
//------------------------------------------------------ // // Constructors // //------------------------------------------------------ #region Constructors /// <summary> /// Static ctor. Initializes property metadata. /// </summary> static Table() { MarginProperty.OverrideMetadata(typeof(Table), new FrameworkPropertyMetadata(new Thickness(Double.NaN))); }
static OptionPanel() { MarginProperty.OverrideMetadata(typeof(OptionPanel), new FrameworkPropertyMetadata(new Thickness(2, 0, 4, 0))); }
static LayoutItem() { ToolTipProperty.OverrideMetadata(typeof(LayoutItem), new FrameworkPropertyMetadata(null, (s, e) => OnToolTipChanged(s, e))); VisibilityProperty.OverrideMetadata(typeof(LayoutItem), new FrameworkPropertyMetadata(Visibility.Visible, (s, e) => OnVisibilityChanged(s, e))); MarginProperty.OverrideMetadata(typeof(LayoutItem), new FrameworkPropertyMetadata(new Thickness(0), (s, e) => OnMarginChanged(s, e))); }
/// <summary> /// Initialises static members of the <see cref="Window"/> class. /// </summary> static Window() { DefaultStyleKeyProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(typeof(Window))); MarginProperty.OverrideMetadata(typeof(Window), new FrameworkPropertyMetadata(new PropertyChangedCallback(OnMarginPropertyChanged))); }