private static void PercentageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SliderGauge g = d as SliderGauge; g.m_percentage = g.CoercePercentage((double)e.NewValue); g.UpdateVisuals(); }
private static void OrientationChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SliderGauge g = d as SliderGauge; if (g != null) { g.UpdateVisuals(); } }
private static void PercentageChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { SliderGauge g = d as SliderGauge; if (g != null) { if (g.m_percentageTextBlock != null) { g.m_percentageTextBlock.Text = g.Percentage.ToString("p0"); } g.UpdateVisuals(); } }