示例#1
0
        public MemberViewModel()
        {
            Title              = "Member";
            Members            = new ObservableCollection <Member>();
            LoadMembersCommand = new Command(async() => await ExecuteLoadItemsCommand());

            /*TODO: MessagingCenter to register when implemented AddMember*/

            MessagingCenter.Subscribe <NewMemberPage, Member>(this, "AddMember", async(obj, item) =>
            {
                var newItem = item as Member;
                Members.Add(newItem);
                await MemberStore.AddDataAsync(newItem);
            });
        }