ChampionshipBetViewModel overview
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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