private void ButtonClick(object sender, RoutedEventArgs e) { Button cmd = (Button)e.OriginalSource; Type type = this.GetType(); Assembly assembly = type.Assembly; Window win = (Window)assembly.CreateInstance( type.Namespace + "." + cmd.Content); win.ShowDialog(); }
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-20 14:27:24