Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GalaSoft.MvvmLight;
- using MvvmLight5.Model;
- using System.Collections.Generic;
- namespace MvvmLight5.ViewModel
- {
- public class MainViewModel : ViewModelBase
- {
- private readonly IDataService _dataService;
- public const string WelcomeTitlePropertyName = "WelcomeTitle";
- private string _welcomeTitle = string.Empty;
- public string WelcomeTitle
- {
- get
- {
- return _welcomeTitle;
- }
- set
- {
- if (_welcomeTitle == value)
- {
- return;
- }
- _welcomeTitle = value;
- RaisePropertyChanged(WelcomeTitlePropertyName);
- }
- }
- public const string theTextPropertyName = "theText";
- private string _theText = string.Empty;
- public string theText
- {
- get
- {
- return _theText;
- }
- set
- {
- if (_theText == value)
- {
- return;
- }
- _welcomeTitle = value;
- RaisePropertyChanged(WelcomeTitlePropertyName);
- }
- }
- public Dictionary<string, string> theDictionary;
- private List<Dictionary<string, string>> _theList;
- public const string theListPropertyName = "theList";
- public List<Dictionary<string, string>> theList
- {
- get
- {
- return _theList;
- }
- set
- {
- if (_theList == value)
- return;
- _theList = value;
- RaisePropertyChanged(theListPropertyName);
- }
- }
- /// <summary>
- /// Initializes a new instance of the MainViewModel class.
- /// </summary>
- public MainViewModel(IDataService dataService)
- {
- List<Dictionary<string, string>> x = new List<Dictionary<string, string>>();
- theDictionary = new Dictionary<string, string>();
- theDictionary.Add("1", "A");
- theDictionary.Add("2", "B");
- theList = new List<Dictionary<string, string>>();
- theList.Add(theDictionary);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement