Files
Shrlalgo.RvKits/AntdWpfDemo/ViewModels/SwitchViewModel.cs
2025-07-31 20:12:24 +08:00

34 lines
615 B
C#

using Caliburn.Micro;
using System.ComponentModel.Composition;
namespace AntDesignWPFDemo.ViewModels
{
[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;
}
}
}