【发布时间】:2014-04-16 15:21:11
【问题描述】:
失去焦点事件代码:
public void myTextBox_LostFocus(object sender, System.Windows.Input.GestureEventArgs e)
{
string name = ((TextBox)sender).Name;
string strl = "tbox" + name.Substring(4);
TextBox text = FindTextBoxByName(strl);
text.HorizontalAlignment = HorizontalAlignment.Left;
text.Width = 50;
text.Height = 40;
}
事件调用:-
myTextBox1j.LostFocus += new EventHandler<GestureEventArgs>(myTextBox_LostFocus);
引发以下错误:- 无法将类型“System.EventHandler”隐式转换为“System.Windows.RoutedEventHandler”
【问题讨论】:
标签: c# xaml windows-phone-8