public MainWindow() { InitializeComponent(); DataContext = this; BrowserModel = new BrowserViewModel(); this.Loaded += MainWindow_Loaded; }
private void CreateMapNavbarTab() { string curDir = Directory.GetCurrentDirectory().Replace('\\', '/'); string targetFile = String.Format("file:///{0}/Views/WorldMapView/MapResources/html/WorldMap.html", curDir); WorldMapView mapView = new WorldMapView(); BrowserViewModel BrowserModel = new BrowserViewModel(); BrowserModel.Address = targetFile; BrowserModel.WebBrowser = new ChromiumWebBrowser(); mapView.DataContext = BrowserModel; _navbarModel.AddTab("Observatories", "", "appbar_location_round", "View observatories around the world", mapView); }