更新
This commit is contained in:
59
AntdWpfDemo/ViewModels/ButtonViewModel.cs
Normal file
59
AntdWpfDemo/ViewModels/ButtonViewModel.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using AntdWpf.Controls;
|
||||
|
||||
using Caliburn.Micro;
|
||||
|
||||
using System.ComponentModel.Composition;
|
||||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace AntdWpfDemo.ViewModels
|
||||
{
|
||||
[Export(typeof(IScreen))]
|
||||
internal class ButtonViewModel : Screen
|
||||
{
|
||||
public Sizes? Size { get; set; }
|
||||
|
||||
private bool loading1;
|
||||
|
||||
public bool Loading1
|
||||
{
|
||||
get { return loading1; }
|
||||
set
|
||||
{
|
||||
loading1 = value;
|
||||
NotifyOfPropertyChange();
|
||||
}
|
||||
}
|
||||
|
||||
private bool loading2;
|
||||
|
||||
public bool Loading2
|
||||
{
|
||||
get { return loading2; }
|
||||
set
|
||||
{
|
||||
loading2 = value;
|
||||
NotifyOfPropertyChange();
|
||||
}
|
||||
}
|
||||
|
||||
public ButtonViewModel()
|
||||
{
|
||||
DisplayName = "Button";
|
||||
}
|
||||
|
||||
public void Click1()
|
||||
{
|
||||
Loading1 = true;
|
||||
var app = Application.Current;
|
||||
|
||||
//app.Resources["ButtonPrimaryBrush"] = new SolidColorBrush(Color.FromRgb(114, 46, 209));
|
||||
app.Resources["PrimaryBrush"] = new SolidColorBrush(Color.FromRgb(114, 46, 209));
|
||||
}
|
||||
|
||||
public void Click2()
|
||||
{
|
||||
Loading2 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user