Last active
October 28, 2020 20:25
-
-
Save Char0394/5099221e476bf0e18e9415f4f695ca46 to your computer and use it in GitHub Desktop.
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 MainPageViewModel : INotifyPropertyChanged | |
{ | |
public ICommand SelectItemCommand { get => new Command<string>((param) => PositionSelected = int.Parse(param)); } | |
public int _positionSelected = 0; | |
public int PositionSelected | |
{ | |
set | |
{ | |
if (_positionSelected != value) | |
{ | |
_positionSelected = value; | |
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(PositionSelected))); | |
} | |
} | |
get => _positionSelected; | |
} | |
public event PropertyChangedEventHandler PropertyChanged; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment