Beispiel #1
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            AppCache.ApplicationDomain = HtmlPage.Document.DocumentUri.AbsoluteUri.Substring(
                0, HtmlPage.Document.DocumentUri.AbsoluteUri.IndexOf(HtmlPage.Document.DocumentUri.AbsolutePath));
            Resources.Add("ApplicationViewModel", AppCache.ApplicationViewModel);
            this.RootVisual = new MainPage();
            // HtmlDocument requires using System.Windows.Browser;
            HtmlDocument doc = HtmlPage.Document;
            ////Enable the HTML textbox on the page and say hello
            //doc.GetElementById("Text1").SetProperty("disabled", false);
            //doc.GetElementById("Text1").SetAttribute("value",
            //    "This text set from managed code.");
            //Set up some scriptable managed types for access from Javascript.
            ScriptableManagedType smt = new ScriptableManagedType();

            HtmlPage.RegisterScriptableObject("SLapp", smt);
        }
Beispiel #2
0
        private void Application_Startup(object sender, StartupEventArgs e)
        {
            AppCache.ApplicationDomain = HtmlPage.Document.DocumentUri.AbsoluteUri.Substring(
                                            0, HtmlPage.Document.DocumentUri.AbsoluteUri.IndexOf(HtmlPage.Document.DocumentUri.AbsolutePath));
            Resources.Add("ApplicationViewModel", AppCache.ApplicationViewModel);
            this.RootVisual = new MainPage();
            // HtmlDocument requires using System.Windows.Browser;
            HtmlDocument doc = HtmlPage.Document;
            ////Enable the HTML textbox on the page and say hello
            //doc.GetElementById("Text1").SetProperty("disabled", false);
            //doc.GetElementById("Text1").SetAttribute("value",
            //    "This text set from managed code.");
            //Set up some scriptable managed types for access from Javascript.
            ScriptableManagedType smt = new ScriptableManagedType();

            HtmlPage.RegisterScriptableObject("SLapp", smt);
        }