Silverlight(6) - 2.0控件之ScrollViewer, Slider, StackPanel, TabControl, TextBlock, TextBox, ToggleButton
2008-11-14 11:50:44 来源:WEB开发网Slider.xaml.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
namespace Silverlight20.Control
{
public partial class Slider : UserControl
{
public Slider()
{
InitializeComponent();
}
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
// RoutedPropertyChangedEventArgs<double>.OldValue - Slider控件的原值
// RoutedPropertyChangedEventArgs<double>.NewValue - Slider控件的新值
lblMsg.Text = string.Format("原值:{0}rn新值:{1}", e.OldValue.ToString(), e.NewValue.ToString());
}
}
}
3、StackPanel.xaml
<UserControl x:Class="Silverlight20.Control.StackPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<StackPanel HorizontalAlignment="Left">
<!--
Orientation - StackPanel控件内对象的排列方向
Horizontal - 水平排列
Vertical - 垂直排列
-->
<StackPanel Orientation="Horizontal">
<TextBlock Text="a" Margin="5" />
<TextBlock Text="b" Margin="5" />
<TextBlock Text="c" Margin="5" />
</StackPanel>
<StackPanel Orientation="Vertical">
<TextBlock Text="a" Margin="5" />
<TextBlock Text="b" Margin="5" />
<TextBlock Text="c" Margin="5" />
</StackPanel>
</StackPanel>
</UserControl>
Tags:Silverlight 控件 ScrollViewer
编辑录入:爽爽 [复制链接] [打 印]- ››silverlight全屏显示图片
- ››控件一:Gallery 之无限循环的问题
- ››控件一:Gallery 之基础用法
- ››Silverlight MVVM 模式(一) 切近实战
- ››Silverlight for Windows Phone 7开发系列(1):...
- ››Silverlight for Windows Phone 7开发系列(2):...
- ››Silverlight for Windows Phone 7开发系列(3):...
- ››Silverlight for Windows Phone 7开发系列(4):...
- ››Silverlight for Symbian
- ››Silverlight3系列(四)数据绑定 Data Binding 1
- ››silverlight2 游戏 1 你能坚持多少秒
- ››Silverlight开发实践--PicZoomShow
- 中查找“Silverlight(6) - 2.0控件之ScrollViewer, Slider, StackPanel, TabControl, TextBlock, TextBox, ToggleButton”更多相关内容
- 中查找“Silverlight(6) - 2.0控件之ScrollViewer, Slider, StackPanel, TabControl, TextBlock, TextBox, ToggleButton”更多相关内容
- 上一篇:Silverlight(7) - 2.0图形之Ellipse, Line, Path, Polygon, Polyline, Rectangle
- 下一篇:Silverlight(5) - 2.0控件之ListBox, MediaElement, MultiScaleImage, PasswordBox, ProgressBar, RadioButton
更多精彩
赞助商链接