static LinearAxis() { OrientationProperty.OverrideMetadata(typeof(LinearAxis), new FrameworkPropertyMetadata((d, e) => { ((LinearAxis)d)._orientationCache = (AxisOrientation)e.NewValue; ScalingPropertyChanged(d, e); })); }
static AsyncDataGridColumnHeadersPanel() { OrientationProperty.OverrideMetadata( typeof(AsyncDataGridColumnHeadersPanel), new FrameworkPropertyMetadata(Orientation.Horizontal)); ClipToBoundsProperty.OverrideMetadata( typeof(AsyncDataGridColumnHeadersPanel), new FrameworkPropertyMetadata(true)); }
static SpectrumSlider() { DefaultStyleKeyProperty.OverrideMetadata(typeof(SpectrumSlider), new FrameworkPropertyMetadata(typeof(SpectrumSlider))); HueProperty = DependencyProperty.Register("Hue", typeof(double), typeof(SpectrumSlider), new PropertyMetadata(0d, OnHuePropertyChanged)); OrientationProperty.OverrideMetadata(typeof(SpectrumSlider), new FrameworkPropertyMetadata(System.Windows.Controls.Orientation.Vertical)); MaximumProperty.OverrideMetadata(typeof(SpectrumSlider), new FrameworkPropertyMetadata(360d)); MinimumProperty.OverrideMetadata(typeof(SpectrumSlider), new FrameworkPropertyMetadata(0d)); IsMoveToPointEnabledProperty.OverrideMetadata(typeof(SpectrumSlider), new FrameworkPropertyMetadata(true)); }
/*public static readonly StyledProperty<double> SpacingProperty = * StackLayout.SpacingProperty.AddOwner<ToolStripItemsPanel>(); * * public double Spacing * { * get => GetValue(SpacingProperty); * set => SetValue(SpacingProperty, value); * }*/ static ToolStripItemsPanel() { AffectsMeasure <ToolStripItemsPanel>(SpacingProperty); OrientationProperty.OverrideDefaultValue <ToolStripItemsPanel>(Orientation.Horizontal); BoundsProperty.Changed.AddClassHandler <ToolStripItemsPanel>(new Action <ToolStripItemsPanel, AvaloniaPropertyChangedEventArgs>((sender, e) => { if ((e.NewValue != null) && (e.NewValue is Rect rect)) { sender.ArrangeOverride(rect.Size); } })); }
static ExpandingStackPanel() { if (!DesignerProperties.GetIsInDesignMode(new DependencyObject())) { _defaultCallback = OrientationProperty?.GetMetadata(typeof(StackPanel))?.PropertyChangedCallback; var metadata = new FrameworkPropertyMetadata( Orientation.Vertical, FrameworkPropertyMetadataOptions.AffectsMeasure, new PropertyChangedCallback(OnOrientationChanged)); OrientationProperty?.OverrideMetadata(typeof(ExpandingStackPanel), metadata); } }
// Static constructor. static Slider3D() { OrientationProperty.OverrideMetadata(typeof(Slider3D), new FrameworkPropertyMetadata(PropertyChanged)); ValueProperty.OverrideMetadata(typeof(Slider3D), new FrameworkPropertyMetadata(PropertyChanged)); MinimumProperty.OverrideMetadata(typeof(Slider3D), new FrameworkPropertyMetadata(PropertyChanged)); MaximumProperty.OverrideMetadata(typeof(Slider3D), new FrameworkPropertyMetadata(PropertyChanged)); IsDirectionReversedProperty.OverrideMetadata(typeof(Slider3D), new FrameworkPropertyMetadata(PropertyChanged)); }
set => SetValue(OrientationProperty, value);
/// <summary> /// Initializes static members of the RibbonGroupsContainer class. /// </summary> static RibbonGroupsPanel() { OrientationProperty.OverrideMetadata(typeof(RibbonGroupsPanel), new FrameworkPropertyMetadata(Orientation.Horizontal, null, new CoerceValueCallback(CoerceOrientation))); }
set => this.SetValue(OrientationProperty, value);
get => (Orientation)GetValue(OrientationProperty); set => SetValue(OrientationProperty, value);
static RibbonMenuItemsPanel() { OrientationProperty.OverrideMetadata(typeof(RibbonMenuItemsPanel), new FrameworkPropertyMetadata(Orientation.Vertical)); }
static StackPanelEx() { OrientationProperty.OverrideMetadata(typeof(StackPanelEx), new FrameworkPropertyMetadata(OnOrientationPropertyChanged)); SpacingProperty.OverrideMetadata(typeof(StackPanelEx), new FrameworkPropertyMetadata(OnSpacingPropertyChanged)); }
/// <summary> /// Default constructor /// </summary> public WrapPanel() : base() { _orientation = (Orientation)OrientationProperty.GetDefaultValue(DependencyObjectType); }
set => SetValue(OrientationProperty, EnumUtil.GetBoxed(value));
set => SetValue(OrientationProperty, ValueBoxes.OrientationBox(value));