Esempio n. 1
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = this;
     BrowserModel = new BrowserViewModel();
     this.Loaded += MainWindow_Loaded;
 }
Esempio n. 2
0
        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);
        }