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] |
'Silverlight' 카테고리의 다른 글
61.SilverLight3 - ListBox (0) | 2009.12.02 |
---|---|
60.SilverLight3 - ComboBox (0) | 2009.12.02 |
58.SilverLight3 - ScrollViewer (0) | 2009.12.02 |
57.SilverLight3 - ToolTip (0) | 2009.12.02 |
56.SilverLight3 - CheckBox (0) | 2009.12.02 |
Comments