Пример #1
0
        private static void OnDecimalPlacesChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            PhyasrumSlider control = (PhyasrumSlider)source;

            control.DecimalPlaces = (uint)e.NewValue;

            control.lbl_Value.ContentStringFormat = $"N{control.DecimalPlaces}";
            control.lbl_Min.ContentStringFormat   = $"N{control.DecimalPlaces}";
            control.lbl_Max.ContentStringFormat   = $"N{control.DecimalPlaces}";
            control.slider.TickFrequency          = 1d / Math.Pow(10, control.DecimalPlaces);
        }
Пример #2
0
        private static void OnMaxChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            PhyasrumSlider control = (PhyasrumSlider)source;

            control.Max = (float)e.NewValue;
        }
Пример #3
0
        private static void OnPropertyTypeChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            PhyasrumSlider control = (PhyasrumSlider)source;

            control.PropertyType = (PropertyType)e.NewValue;
        }
Пример #4
0
        private static void OnValueChangedChanged(DependencyObject source, DependencyPropertyChangedEventArgs e)
        {
            PhyasrumSlider control = (PhyasrumSlider)source;

            control.ValueChanged = (ICommand)e.NewValue;
        }