//private void ShowChart_Completed(object sender, EventArgs e) //{ // MainChart.DataContext = ViewModel.CurrentChartViewModel; // ViewModel.CurrentChartViewModel.RefreshCommand.Execute(3600); //} //private void HideChart_Completed(object sender, EventArgs e) //{ // MainChart.DataContext = null; //} protected override void OnOrientationChanged(OrientationChangedEventArgs e) { if ((e.Orientation & PageOrientation.Portrait) != 0) { //NavigationService.Navigate(new Uri("/View/ChartView.xaml", UriKind.Relative)); VisualStateManager.GoToState(this, "PortraitVisualState", true); } else { VisualStateManager.GoToState(this, "LandscapeVisualState", true); MainChart.Activate(); } base.OnOrientationChanged(e); }