59.SilverLight3 - ScrollBar
MainPage.xaml |
[그림 59-1] <Grid x:Name="LayoutRoot" Background="White"> <StackPanel> <ScrollBar x:Name="sb" Width="200" Height="50" Orientation="Horizontal" Minimum="0" Maximum="100" Value="50"
SmallChange="10" LargeChange="30"></ScrollBar> <TextBlock x:Name="lblDisplay" Text="선택된 값 : "></TextBlock> </StackPanel> </Grid> |
MainPage.xaml.cs |
public partial class MainPage : UserControl { public
MainPage() { InitializeComponent(); sb.ValueChanged += new RoutedPropertyChangedEventHandler<double>(sb_ValueChanged); } void
sb_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { lblDisplay.Text = "선택된 값 : " + this.sb.Value.ToString(); } } |
결과화면 |
[그림 59-2] |