XAML:
<Slider
x:Name="AngleSlider"
Margin="19,279,24,278"
Maximum="60"
SmallChange="1"
LargeChange="10"
/>
<TextBox
x:Name="txtAngle"
Margin="92,194,0,0"
InputScope="Number"
HorizontalAlignment="Left"
Width="85" FontSize="21"
Height="85"
VerticalAlignment="Top"
d:LayoutOverrides="Height"
Text="{Binding ElementName=AngleSlider, Path=Value, Mode=TwoWay}"
/>
I have tried other suggestions I have found to round the number created by the slider in a ValueChaged event handler, this is not working either.
private void AngleSlider_ValueChanged(object sender, System.Windows.RoutedPropertyChangedEventArgs<double> e)
{
AngleSlider.Value = Math.Round(e.NewValue);
}
This post has been edited by d.buckner: 05 August 2012 - 11:50 AM

New Topic/Question
Reply


MultiQuote



|