A cross-platform UI framework for .NET
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.
 
 
 

32 lines
896 B

using System;
using ReactiveUI;
namespace RenderDemo.ViewModels
{
public class MainWindowViewModel : ReactiveObject
{
private bool drawDirtyRects = false;
private bool drawFps = true;
public MainWindowViewModel()
{
ToggleDrawDirtyRects = ReactiveCommand.Create(() => DrawDirtyRects = !DrawDirtyRects);
ToggleDrawFps = ReactiveCommand.Create(() => DrawFps = !DrawFps);
}
public bool DrawDirtyRects
{
get { return drawDirtyRects; }
set { this.RaiseAndSetIfChanged(ref drawDirtyRects, value); }
}
public bool DrawFps
{
get { return drawFps; }
set { this.RaiseAndSetIfChanged(ref drawFps, value); }
}
public ReactiveCommand ToggleDrawDirtyRects { get; }
public ReactiveCommand ToggleDrawFps { get; }
}
}