예제 #1
0
 public MainWindow()
 {
     InitializeComponent();
     DataContext = this;
     BrowserModel = new BrowserViewModel();
     this.Loaded += MainWindow_Loaded;
 }
예제 #2
0
파일: Shell.xaml.cs 프로젝트: Civa/Zenith
        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);
        }