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