Skip to content

Instantly share code, notes, and snippets.

@Char0394
Created February 12, 2019 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Char0394/a29d7321dfb4420110fc162af233df41 to your computer and use it in GitHub Desktop.
Save Char0394/a29d7321dfb4420110fc162af233df41 to your computer and use it in GitHub Desktop.
using System.ComponentModel;
using System.Windows.Input;
namespace GenericAnimationFormsSample
{
public class MainPageViewModel: INotifyPropertyChanged
{
public ICommand ShakeCommand { get; set; }
public string _userName;
public string UserName
{
get
{
return _userName;
}
set
{
_userName = value;
if (_userName?.Length == 5)
{
ShakeCommand.Execute(null);
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment