private void slider_SolderStepper2_Current_ValueChanged(object sender, RoutedPropertyChangedEventArgs <double> e) { if (ConfigLoaded) { byte newvalue = System.Convert.ToByte(slider_SolderStepper2_Current.Value); usbController.setSolderStepper2Current(newvalue); lbl_SolderStepper2_Current.Content = calculateCurrent_mA(newvalue).ToString("0.00 A"); } }