Created
January 15, 2017 08:07
-
-
Save gurvinderbini/592e7f4f1822fe0f5c99d548ced253a2 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
using System; | |
using System.Collections.Generic; | |
namespace NewFeature | |
{ | |
public class MainPageViewModel | |
{ | |
private object _itemSelectedFromList; | |
public MainPageViewModel() | |
{ | |
ItemsList = new List<string> | |
{ | |
"New York", | |
"Boston", | |
"Chicago", | |
}; | |
} | |
public List<string> ItemsList { get; set; } | |
public object ItemSelectedFromList | |
{ | |
get { return _itemSelectedFromList; } | |
set | |
{ | |
_itemSelectedFromList = value; | |
RaisePropertyChanged(() => ItemSelectedFromList); //in case you are using MVVM Light | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment