Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如果用户单击它之外的任何位置,我想关闭 System.Windows.Window。窗口显示为对话框。如何在 wpf 窗口外接收点击?
AppointmentDetailsView.ShowDialog();
这个怎么样?
public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } protected override void OnDeactivated(EventArgs e) { base.OnDeactivated(e); Close(); } }