8,734
社区成员
发帖
与我相关
我的任务
分享
TextBox txt = new TextBox();
txt.GotFocus += new RoutedEventHandler((sender, e) =>
{
txt.Background = (Brush)args.NewValue;
});
TextBox txt = new TextBox();
txt.GotFocus +=new RoutedEventHandler(txt_GotFocus);
static void txt_GotFocus(object sender, RoutedEventArgs e)
{
.......
}
txt.GotFocus += (sender, e) =>
{
txt.Background = (Brush)args.NewValue;
};