C# 创建IntegerUpDown ValueChanged事件时出现编译器错误
我正在使用来自的C# 创建IntegerUpDown ValueChanged事件时出现编译器错误,c#,wpf,C#,Wpf,我正在使用来自的IntegerUpDown控件 但是,我无法将事件分配给我的函数,因此当值更改时,它将调用我的函数。我对c#和wpf都是新手,非常感谢您的帮助。我一直在努力让它像一个类似的例子中显示的那样工作 private IntegerUpDown m_argumentUpDown; 公共IntArgumentOption(ArgumentOption描述argumentDesc):基础(argumentDesc) { m_argumentUpDown=新整数下降 { 水印=argument
IntegerUpDown
控件
但是,我无法将事件分配给我的函数,因此当值更改时,它将调用我的函数。我对c#和wpf都是新手,非常感谢您的帮助。我一直在努力让它像一个类似的例子中显示的那样工作
private IntegerUpDown m_argumentUpDown;
公共IntArgumentOption(ArgumentOption描述argumentDesc):基础(argumentDesc)
{
m_argumentUpDown=新整数下降
{
水印=argumentDesc.m_水印,
增量=(int)argumentDesc.m_间隔,
最小值=(int)argumentDesc.m_最小值,
最大值=(int)argumentDesc.m_最大值,
FormatString=“G”,
选择AllongotFocus=true,
最小宽度=50,
FontSize=10,
余量=新系统窗口厚度(5,0,0,0),
};
//编译器错误:
m_argumentUpDown.ValueChanged+=新路由属性ChangedEventHandler(ArgumentChanged);
}
无效参数已更改(对象发送方,RoutedPropertyChangedEventArgs e)
{
}
执行此操作将导致编译器错误:
错误CS0029:无法将类型“System.Windows.RoutedPropertyChangedEventHandler