public ChangingCollectionViewModel()
        {
            _Items = new ObservableCollection<int>(new int[] { 1, 2, 3, 4, 5 });

            Replace = new RelayCommand(DoReplace);
            Add = new RelayCommand(DoAdd);
        }
Esempio n. 2
0
  public Couple():base()
 {
     GoOne = new RelayCommand(() => 
         Navigation.NavigateAsync(One));
     GoTwo = new RelayCommand(() => 
         Navigation.NavigateAsync(Two));
 }
Esempio n. 3
0
 public SkillsViewModel()
 {
     RemoveSkill = new RelayCommand<Skill>(s => this.Skills.Remove(s));
     AddSkill = new RelayCommand<Skill>(s => { MainSkill = new Skill() {Type="Type",Name="New skill" }; this.Skills.Add(MainSkill); });
     Skills = new ObservableCollection<Skill>();
     SelectedSkills = new ObservableCollection<Skill>();
 }
Esempio n. 4
0
        public Person(ICommand ForTest=null)
        {
            Skills = new ObservableCollection<Skill>();

            TestCommand = ForTest;
            Command = new ToogleRelayCommand(DoCommand);
            RemoveSkill = new RelayCommand<Skill>(s=> this.Skills.Remove(s));
            ChangeSkill = new RelayCommand<Skill>(s => MainSkill = (this.Skills.Count>0)?this.Skills[0] : null);
        }
Esempio n. 5
0
 public Nav()
 {
     DoNav = new RelayCommand(() => Navigation.NavigateAsync(this));
 }
 public A1()
 {
     Change = new RelayCommand(() => Navigation.NavigateAsync(new A1()));
     GoTo1 = new RelayCommand(() => Navigation.NavigateAsync(new A2()));
 }
 public AA1()
 {
     Exception = new Exception();
     Change = new RelayCommand(() => { throw Exception; });
     GoTo1 = new RelayCommand(() => Navigation.NavigateAsync(new A2()));
 }
Esempio n. 8
0
 public Couple()
 {
     MakeSelf = new RelayCommand(_ => DoMakeSelf());
     Duplicate = new RelayCommand(_ => DoDuplicate());
     
 }
Esempio n. 9
0
 public Person():base()
 {
     GoCouple = new RelayCommand(() => Navigation.NavigateAsync(Couple));
 }