更新时间:2023-12-05 23:42:28
您可以使用RelayCommand()
和
$ b将按钮绑定到命令$ b使用Application.Current.MainWindow
属性从ViewModel打开子窗口,将新子窗口链接到现有的MainWindow。
You can bind your button to a command usingRelayCommand()
and
have the child Window being opened from the ViewModel using theApplication.Current.MainWindow
property to link your new child window to the existing MainWindow.