protected async override void OnNavigatedTo(NavigationEventArgs e) { _dataTransferManager = DataTransferManager.GetForCurrentView(); _dataTransferManager.DataRequested += OnDataRequested; _navigationHelper.OnNavigatedTo(e); if (FlickrModel != null) { await FlickrModel.LoadItemsAsync(); FlickrModel.SelectItem(e.Parameter); FlickrModel.ViewType = ViewTypes.Detail; } DataContext = this; // Allow this page to rotate _currentOrientations = DisplayInformation.AutoRotationPreferences; DisplayInformation.AutoRotationPreferences = DisplayOrientations.Portrait | DisplayOrientations.Landscape | DisplayOrientations.LandscapeFlipped | DisplayOrientations.PortraitFlipped; // Handle orientation changes DisplayInformation.GetForCurrentView().OrientationChanged += this.OnOrientationChanged; this.TransitionStoryboardState(); }
protected async override void OnNavigatedTo(NavigationEventArgs e) { _dataTransferManager = DataTransferManager.GetForCurrentView(); _dataTransferManager.DataRequested += OnDataRequested; _navigationHelper.OnNavigatedTo(e); await FlickrModel.LoadItemsAsync(); FlickrModel.SelectItem(e.Parameter); if (FlickrModel != null) { FlickrModel.ViewType = ViewTypes.Detail; } DataContext = this; }