- 참고 [ 41.SilverLight3 - Perspective 3D ]
MainPage.xaml |
[그림 63-1] <Grid x:Name="LayoutRoot" Background="White"> <StackPanel Height="200"> <Slider x:Name="slider" Maximum="20" Minimum="12" Width="200" Height="20"> </Slider> <TextBlock x:Name="txt" Text="안녕" Width="Auto" FontSize="12" TextAlignment="Center"></TextBlock> <TextBlock x:Name="txtSize" Text="" FontSize="15" Foreground="Blue"> </TextBlock> </StackPanel> </Grid> |
MainPage.xaml.cs |
namespace Slider { public partial class MainPage : UserControl { public
MainPage() { InitializeComponent(); this.slider.ValueChanged
+= new RoutedPropertyChangedEventHandler<double>(slider_ValueChanged); } void
slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e) { this.txt.FontSize
= slider.Value; //txtSize.Text =
e.NewValue.ToString(); txtSize.Text =
slider.Value.ToString(); } } } |
결과화면 |
[그림 63-2] |
'Silverlight' 카테고리의 다른 글
65.SilverLight3 - Calendar / DatePicker (1) | 2009.12.02 |
---|---|
64.SilverLight3 - Tab (0) | 2009.12.02 |
62.SilverLight3 - ProgressBar (0) | 2009.12.02 |
61.SilverLight3 - ListBox (0) | 2009.12.02 |
60.SilverLight3 - ComboBox (0) | 2009.12.02 |
Comments