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); }
private static void OnMaxChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { PhyasrumSlider control = (PhyasrumSlider)source; control.Max = (float)e.NewValue; }
private static void OnPropertyTypeChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { PhyasrumSlider control = (PhyasrumSlider)source; control.PropertyType = (PropertyType)e.NewValue; }
private static void OnValueChangedChanged(DependencyObject source, DependencyPropertyChangedEventArgs e) { PhyasrumSlider control = (PhyasrumSlider)source; control.ValueChanged = (ICommand)e.NewValue; }