Exemplo n.º 1
0
        private void OnBlockedStatusChanged(object sender, BlockedEventArgs e)
        {
            Execute.OnUIThread(() =>
            {
                if (ApplicationBar == null)
                {
                    return;
                }

                if (e.Blocked)
                {
                    ApplicationBar.MenuItems.Remove(_blockMenuItem);
                    ApplicationBar.MenuItems.Add(_unblockMenuItem);
                }
                else
                {
                    ApplicationBar.MenuItems.Remove(_unblockMenuItem);
                    ApplicationBar.MenuItems.Add(_blockMenuItem);
                }
            });
        }
Exemplo n.º 2
0
        private void OnBlockedStatusChanged(object sender, BlockedEventArgs e)
        {
            Execute.OnUIThread(() =>
            {
                //if (ApplicationBar == null) return;
                if (ViewModel.CurrentContact.IsSelf)
                {
                    return;
                }

                if (e.Blocked)
                {
                    AppBarMenuItems.Children.Remove(_blockMenuItem);
                    AppBarMenuItems.Children.Add(_unblockMenuItem);
                }
                else
                {
                    AppBarMenuItems.Children.Remove(_unblockMenuItem);
                    AppBarMenuItems.Children.Add(_blockMenuItem);
                }
            });
        }