///<summary> Обработчик нажатия на приглашение </summary>
        private void OpenModelContactDetail(ModelContact modelContact)
        {
            if (modelContact != null)
            {
                _viewContactDetail = new ViewContactDetail(modelContact);

                GridContactRequestInviteDetail.Children.Add(_viewContactDetail);

                Grid.SetRow(_viewContactDetail, 1);

                GridContactRequestInvite.Visibility       = Visibility.Hidden;
                GridContactRequestInviteDetail.Visibility = Visibility.Visible;
            }
        }
Example #2
0
        ///<summary> Обработчик нажатия на header в детализации истории </summary>
        private void HeaderContact_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            var modelContact = _viewModelCallHistoryDetail.ModelContactObj;

            if (modelContact != null)
            {
                _viewContactDetail = new ViewContactDetail(modelContact);

                GridHistoryDitailContact.Children.Add(_viewContactDetail);

                Grid.SetRow(_viewContactDetail, 1);

                GridHistoryDetail.Visibility        = Visibility.Hidden;
                GridHistoryDitailContact.Visibility = Visibility.Visible;
            }
        }
        ///<summary> Обработчик изменения выбора контакта в списке контактов </summary>
        private void ListBoxContact_OnSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count == 0)
            {
                return;
            }

            var modelContact = e.AddedItems[0] as ModelContact;

            if (modelContact != null)
            {
                _viewContactDetail = new ViewContactDetail(modelContact); // но придется реализовывать вверху кнопку назад в поиск

                GridContactDirectoryDitail.Children.Add(_viewContactDetail);

                Grid.SetRow(_viewContactDetail, 1);

                GridSearch.Visibility = Visibility.Hidden;
                GridContactDirectoryDitail.Visibility = Visibility.Visible;
            }
        }