Ejemplo n.º 1
0
 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));
 }
Ejemplo n.º 2
0
 static ColorSlider()
 {
     FromColorProperty = DependencyProperty.Register("FromColor", typeof(Color), typeof(ColorSlider), new PropertyMetadata(null));
     ToColorProperty   = DependencyProperty.Register("ToColor", typeof(Color), typeof(ColorSlider), new PropertyMetadata(null));
     DefaultStyleKeyProperty.OverrideMetadata(typeof(ColorSlider), new FrameworkPropertyMetadata(typeof(ColorSlider)));
     MaximumProperty.OverrideMetadata(typeof(ColorSlider), new FrameworkPropertyMetadata(255d));
     MinimumProperty.OverrideMetadata(typeof(ColorSlider), new FrameworkPropertyMetadata(0d));
     IsMoveToPointEnabledProperty.OverrideMetadata(typeof(ColorSlider), new FrameworkPropertyMetadata(true));
 }