protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { base.OnNavigatedTo(e); if (!App.IsConnected) { if (!_isHit) { _isHit = true; NavigationService.Navigate(new Uri("/ConnectPage.xaml", UriKind.Relative)); } else { ShowDisconnected(); } } else { StatusTextBlock.Text = string.Format("Connected as: {0}", App.ClientInfo.DisplayName); PageTitle.Text = App.ClientInfo.ChannelName; SendButton.Visibility = System.Windows.Visibility.Visible; InputTextBox.Visibility = System.Windows.Visibility.Visible; ((ApplicationBarIconButton)this.ApplicationBar.Buttons[0]).IsEnabled = true; ((ApplicationBarIconButton)this.ApplicationBar.Buttons[1]).IsEnabled = false; PushServiceClient.GetLastMessages(App.ClientInfo); } _appInfo = ClientInfoService.GetAppInfo(); if (App.IsTrial) { BuyButton.Visibility = System.Windows.Visibility.Visible; } else { BuyButton.Visibility = System.Windows.Visibility.Collapsed; } }