标签:cli object form sage onclick handle div framework type
public MainWindow() { InitializeComponent(); this.AddHandler(Button.ClickEvent, new RoutedEventHandler(this.ButtonClicked)); } void ButtonClicked(object sender, RoutedEventArgs e) { string SourceString = string.Format("LogicalTree start point: {0}, type is {1}", (e.Source as FrameworkElement).Name, e.Source.GetType().Name); string OriginalSourceString = string.Format("VisualTree start point: {0}, type is {1}", (e.OriginalSource as FrameworkElement).Name, e.OriginalSource.GetType().Name); MessageBox.Show(OriginalSourceString + "\r\n" + SourceString); }
标签:cli object form sage onclick handle div framework type
原文地址:http://www.cnblogs.com/brucemengbm/p/6851567.html