WPF --- 小窗口

1 Button button = (Button)e.OriginalSource;

2             Type type = this.GetType();

3             Assembly assembly = type.Assembly;

4             Window window = (Window)assembly.CreateInstance(type.Namespace + "." + button.Content);

5             window.Show();

 

你可能感兴趣的:(WPF)