コード例 #1
0
 public void ShowOptions()
 {
     if (DeviceFamilyHelper.DeviceFamily == DeviceFamily.Mobile)
     {
         Pivot                 pivot                 = GetPivot();
         SplitView             splitView             = GetSplitView();
         FrameworkElement      selectedContainer     = pivot.ContainerFromIndex(pivot.SelectedIndex) as FrameworkElement;
         DemoModuleViewControl demoModuleViewControl = selectedContainer.VisualChildren().OfType <DemoModuleViewControl>().First();
         ((OptionsControl)splitView.Pane).DemoModule      = demoModuleViewControl.DemoModulePresenter.DemoModuleViewModel;
         ((OptionsControl)splitView.Pane).ContentTemplate = demoModuleViewControl.OptionsPaneContent;
         ((OptionsControl)splitView.Pane).DataContext     = demoModuleViewControl.DataContext;
         splitView.IsPaneOpen = true;
     }
 }