slider控件 当在xmal中不设置其value时 valuechanged事件没什么特别的。。。 但是当在xmal里你设置了 其value值后 那么你就不能在xmal里给它注册 ValueChanged事件了 而是只能在.cs里面去注册 如下:
xmal:
<Slider Name="slider1" Minimum="0" Maximum="100" Value="4" ></Slider>
.cs:
public MainPage()
{
InitializeComponent();
this.slider1.ValueChanged+=new RoutedPropertyChangedEventHandler<double>(slider1_ValueChanged);//注册事件 }
//这个方法是自己写
private void slider1_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
{
this.txt.Text = this.slider1.Value.ToString();
}