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.
 
 
 

35 lines
984 B

// -----------------------------------------------------------------------
// <copyright file="LogInViewModel.cs" company="Steven Kirk">
// Copyright 2015 MIT Licence. See licence.md for more information.
// </copyright>
// -----------------------------------------------------------------------
namespace Perspex.Xaml.Base.UnitTest.SampleModel
{
using ReactiveUI;
public class LogInViewModel : ReactiveObject
{
private string username;
public LogInViewModel()
{
this.OkCommand = ReactiveCommand.Create(
this.WhenAnyValue(
x => x.Username,
x => !string.IsNullOrWhiteSpace(x)));
}
public string Username
{
get { return this.username; }
set { this.RaiseAndSetIfChanged(ref this.username, value); }
}
public ReactiveCommand<object> OkCommand
{
get;
private set;
}
}
}