private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
        {
            if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))
            {
                var frame = Bootstrapper.PhoneFrame;
                if (frame != null)
                {
                    var currentPage = frame.Content as PhoneApplicationPage;
                    if (currentPage != null && currentPage.ApplicationBar != null)
                    {
                        currentPage.ApplicationBar.IsVisible = !ViewModel.IsOpen;
                    }
                }

                if (ViewModel.IsOpen)
                {
                    OpenContactItem.Visibility = ViewModel.OpenContactVisibility;
                    OpenStoryboard.Begin();
                }
                else
                {
                    CloseStoryboard.Begin();
                }
            }
        }
 private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))
     {
         if (!ViewModel.IsOpen)
         {
             CloseStoryboard.Begin();
         }
     }
 }
 private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))
     {
         if (ViewModel.IsOpen)
         {
             OpenStoryboard.Begin();
         }
         else
         {
             ViewModel.Hints.Clear();
             Telegram.Api.Helpers.Execute.BeginOnUIThread(() =>
             {
                 CloseStoryboard.Begin();
             });
         }
     }
 }
示例#4
0
 private void OnViewModelPropertyChanged(object sender, PropertyChangedEventArgs e)
 {
     if (Property.NameEquals(e.PropertyName, () => ViewModel.IsOpen))
     {
         if (ViewModel.IsOpen)
         {
             OpenContactItem.Visibility = ViewModel.OpenContactVisibility;
             OpenStoryboard.Begin();
         }
         else
         {
             if (ViewModel.InlineBots.Count > 0 && ContentPanelTransform.Y == 140.0)
             {
                 InlineBotsControl.Opacity = 0.0;
             }
             CloseStoryboard.Begin();
         }
     }
 }
示例#5
0
 private void _4_Tap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     CloseStoryboard.Begin();
 }
 public void Close()
 {
     CloseStoryboard.Begin();
     Closed?.Invoke();
 }
示例#7
0
        public void Close(Action callback = null)
        {
            _closeCallback = callback;

            CloseStoryboard.Begin();
        }