private void AnimateWidth() { double w = Procent.intX(width, progress); Animations.AnimateWidth(lasttime, w, Divider, time, 0, null); lasttime = w; }
private void UpdateValues() { Dispatcher.Invoke(() => { Progress.Width = Procent.intX(Bg.ActualWidth, Value); Animations.AnimateMargin(ValueLabel.Margin, new Thickness(Procent.intX(Bg.ActualWidth, Value) - Thumb.ActualWidth / 2, ValueLabel.Margin.Top, ValueLabel.Margin.Right, ValueLabel.Margin.Bottom), ValueLabel, 0, 0, null); Val.Text = Value + ""; ThumbMove.Margin = new Thickness(Procent.intX(Bg.ActualWidth, Value) - Thumb.ActualWidth / 2, 0, 0, 0); }); }
private void Thumb_SizeChanged(object sender, SizeChangedEventArgs e) { try { ThumbMove.Margin = new Thickness(Procent.intX(Bg.ActualWidth, Value) - Thumb.ActualWidth / 2, 0, 0, 0); Progress.Width = Procent.intX(Bg.ActualWidth, Value); } catch (Exception ex) { Console.WriteLine(ex.StackTrace); } }
public double GetProgressWidth() { return(Procent.intX(width, progress)); }