public static readonly DependencyProperty CurrentValueProperty=DependencyProperty.Register("CurrentValue",typeof(double),typeof(DoubleWrapper), new PropertyMetadata(0.0,OnUpdateValue));
private static void OnUpdateValue(DependencyObject sender, DependencyPropertyChangedEventArgs e)
{
double val = (double)e.NewValue;
DoubleWrapper obj = (DoubleWrapper)sender;
obj.RawValueText.Text = val.ToString();
obj.FloorText.Text = Math.Floor(val).ToString();