1
namespace SliderMaxValueTest
2

{
3
public partial class Page : UserControl
4
{
5
public Page()
6
{
7
InitializeComponent();
8
}
9
10
private void Slider_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
11
{
12
Val.Text = e.NewValue.ToString();
13
}
14
}
15
}
预览测试网页文件时报错:
Microsoft JScript runtime error: Unhandled Error in Silverlight 2 Application AG_E_PARSER_BAD_PROPERTY_VALUE [Line: 10 Position: 157] at System.Windows.Application.LoadComponent(Object component, Uri xamlUri)
at SliderMaxValueTest.Page.InitializeComponent()
at SliderMaxValueTest.Page..ctor()
at SliderMaxValueTest.App.Application_Startup(Object sender, StartupEventArgs e)
at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
如果不设置 Slider 控件的Value值时,就很正常!
很是纳闷,哪位朋友帮我看下错哪了?难道是Silverlight版本问题?