Esempio n. 1
0
 private void OnDataRequested(DataTransferManager sender, DataRequestedEventArgs args)
 {
     if (DessertsModel != null)
     {
         DessertsModel.GetShareContent(args.Request);
     }
 }
Esempio n. 2
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            if (DessertsModel != null)
            {
                await DessertsModel.LoadItemsAsync();

                DessertsModel.SelectItem(e.Parameter);

                DessertsModel.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();
        }
Esempio n. 3
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await DessertsModel.LoadItemsAsync();

            DataContext = this;
        }
Esempio n. 4
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);
            await DessertsModel.LoadItemsAsync();
        }
Esempio n. 5
0
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            _navigationHelper.OnNavigatedTo(e);
            await DessertsModel.LoadItemsAsync();

            BottomAppBar.IsOpen   = true;
            BottomAppBar.IsSticky = true;
        }
Esempio n. 6
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            await DessertsModel.LoadItemsAsync();

            DessertsModel.SelectItem(e.Parameter);

            if (DessertsModel != null)
            {
                DessertsModel.ViewType = ViewTypes.Detail;
            }
            DataContext = this;
        }
Esempio n. 7
0
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            _dataTransferManager = DataTransferManager.GetForCurrentView();
            _dataTransferManager.DataRequested += OnDataRequested;

            _navigationHelper.OnNavigatedTo(e);

            await DessertsModel.LoadItemsAsync();

            if (e.Parameter is DessertsSchema)
            {
                DessertsModel.Items.Add(e.Parameter as DessertsSchema);
            }
            DessertsModel.SelectItem(e.Parameter);

            if (DessertsModel != null)
            {
                DessertsModel.ViewType = ViewTypes.Detail;
            }
            DataContext           = this;
            BottomAppBar.IsOpen   = true;
            BottomAppBar.IsSticky = true;
        }
Esempio n. 8
0
 protected override async void OnNavigatedTo(NavigationEventArgs e)
 {
     _navigationHelper.OnNavigatedTo(e);
     await DessertsModel.LoadItemsAsync();
 }