Esempio n. 1
0
 public static FrameworkElement CreateCockpit(ViewHub hub)
 {
     var cockpitView = new View.Cockpit();
     var cockpitViewModel = new ViewModels.Cockpit.Cockpit { Dispatchable = cockpitView };
     cockpitViewModel.RegisterHub(hub);
     cockpitView.DataContext = cockpitViewModel;
     return cockpitView;
 }
Esempio n. 2
0
        public static FrameworkElement CreateCockpit(ViewHub hub, IJumpToSource jumpToSource)
        {
            var cockpitView      = new View.Cockpit();
            var cockpitViewModel = new ViewModels.Cockpit.Cockpit {
                Dispatchable = cockpitView
            };

            cockpitViewModel.RegisterHub(hub);
            cockpitViewModel.SourceLocating = jumpToSource;
            cockpitView.DataContext         = cockpitViewModel;
            return(cockpitView);
        }