public static FrameworkElement CreateCurrent(ViewHub hub) { var currentView = new View.Current(); var currentViewModel = new ViewModels.Current.Current { Dispatchable = currentView }; currentViewModel.RegisterHub(hub); currentView.DataContext = currentViewModel; return currentView; }
public static FrameworkElement CreateCurrent(ViewHub hub, Action<Action<LineLocation>> lineRequestor) { var currentView = new View.Current(); var currentViewModel = new ViewModels.Current.Current { Dispatchable = currentView }; currentViewModel.RegisterHub(hub); lineRequestor(currentViewModel.RequestLineHandler()); currentView.DataContext = currentViewModel; return currentView; }
public static FrameworkElement CreateCurrent(ViewHub hub) { var currentView = new View.Current(); var currentViewModel = new ViewModels.Current.Current { Dispatchable = currentView }; currentViewModel.RegisterHub(hub); currentView.DataContext = currentViewModel; return(currentView); }