Ejemplo n.º 1
0
        /// <summary>
        /// A Constructor.
        /// Adds PropertyChanged event handler.
        /// Adds event handler for ListPageListView.ItemSelected to move InsertPage with selected item.
        /// </summary>
        public ListPage()
        {
            InitializeComponent();

            Appearing += async(s, e) =>
            {
                if (await SecurityProvider.CheckContactsPrivilege())
                {
                    UpdateListCommand.Execute(null);
                }
            };

            PropertyChanged             += OnPropertyChanged;
            ListPageListView.ItemTapped += async(o, e) =>
            {
                RecordItem item     = e.Item as RecordItem;
                ItemPage   itemPage = new ItemPage(item, "Update", item.Index);
                await Navigation.PushAsync(itemPage);
            };
        }