Files
Shrlalgo.RvKits/AntdWpfDemo/ViewModels/SwitchViewModel.cs

34 lines
615 B
C#
Raw Normal View History

2025-07-11 09:20:23 +08:00
using Caliburn.Micro;
using System.ComponentModel.Composition;
2025-07-31 20:12:24 +08:00
namespace AntDesignWPFDemo.ViewModels
2025-07-11 09:20:23 +08:00
{
[Export(typeof(IScreen))]
internal class SwitchViewModel : Screen
{
private bool isEnabled;
public bool IsEnabled
{
get { return isEnabled; }
set
{
isEnabled = value;
NotifyOfPropertyChange();
}
}
public SwitchViewModel()
{
DisplayName = "Switch";
}
public void Toggle()
{
IsEnabled = !isEnabled;
}
}
}