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; }
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); }