Skip to content

Instantly share code, notes, and snippets.

@bpatra
Last active August 29, 2015 13:57
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save bpatra/9517801 to your computer and use it in GitHub Desktop.
ChampionshipBetViewModel overview
public class ChampionshipBetViewModel : IChampionshipBetViewModel, IDropTarget
{
private readonly IChampionship _championship;
public ChampionshipBetViewModel(IChampionship championship)
{
_championship = championship;
FootballClubs = new ObservableCollection<IFootballClub>(championship.UserBet);
}
public ObservableCollection<IFootballClub> FootballClubs { get; private set; }
public ICommand ClickSave
{
//MyRelayCommand is an implementation of ICommand that executes the lambda passed as parameter
get { return new MyRelayCommand(() => { _championship.UserBet = new List<IFootballClub>(FootballClubs); }); }
}
public void DragOver(IDropInfo dropInfo)
{
throw new NotImplementedException();
}
public void Drop(IDropInfo dropInfo)
{
throw new NotImplementedException();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment