private void Application_Startup(object sender, StartupEventArgs e) { Params = new GlymaParameters(e.InitParams); var mapLoadParamsManager = new MapLoadParamsManager(); //if the query string contains values pass them on if (mapLoadParamsManager.IsValid(HtmlPage.Document.QueryString, MapLoadType.QueryString)) { RootVisual = new MainPage(mapLoadParamsManager); } else if (mapLoadParamsManager.IsValid(e.InitParams, MapLoadType.InitParams)) { RootVisual = new MainPage(mapLoadParamsManager); } else if (mapLoadParamsManager.IsValid(CookieManager.ReadAll(), MapLoadType.Cookie)) { RootVisual = new MainPage(mapLoadParamsManager); } else { RootVisual = new MainPage(); } RootVisual.MouseRightButtonDown += RootVisualOnMouseRightButtonDown; }