You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
442 B
17 lines
442 B
using System.Windows.Input; |
|
using CommunityToolkit.Mvvm.Input; |
|
|
|
namespace SparkClient.ViewModel; |
|
|
|
public class MainWindowViewModel |
|
{ |
|
public ICommand MinimizeWindowCommand { get; } |
|
|
|
public event Action RequestMinimizeWindow; |
|
|
|
public MainWindowViewModel() |
|
{ |
|
// 定义命令,当执行时触发 RequestMinimizeWindow 事件 |
|
MinimizeWindowCommand = new RelayCommand(() => RequestMinimizeWindow?.Invoke()); |
|
} |
|
} |