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.
 
 
 

33 lines
943 B

using System;
using System.Reactive;
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<Unit, bool> ToggleDrawDirtyRects { get; }
public ReactiveCommand<Unit, bool> ToggleDrawFps { get; }
}
}