Page CreateXamlCodePage(Page demoPage) { HtmlViewerPage result = new HtmlViewerPage(); AssignPageTitle(result, PageXamlName); result.ObtainSourceDelegate = () => { string htmlString = LoadResourceText(demoPage, ".xaml.htm"); if (String.IsNullOrEmpty(htmlString)) { return(null); } return(new HtmlWebViewSource() { Html = ProcessCodeHtmlString(htmlString) }); }; result.Icon = LoadPageIcon(XamlIcon); return(result); }
Page CreateDescriptionPage(Page demoPage, DemoInfo info) { if (info == null) { return(null); } HtmlViewerPage result = new HtmlViewerPage(); AssignPageTitle(result, PageDescriptionName); result.ObtainSourceDelegate = () => { string htmlString = LoadDescriptionHtml(demoPage, ".html"); if (String.IsNullOrEmpty(htmlString)) { return(null); } return(new HtmlWebViewSource() { Html = ProcessHtmlString(htmlString) }); }; result.Icon = LoadPageIcon(DescriptionIcon); return(result); }
Page CreateXamlCodePage(Page demoPage) { HtmlViewerPage result = new HtmlViewerPage(); AssignPageTitle(result, PageXamlName); result.ObtainSourceDelegate = () => { string htmlString = LoadResourceText(demoPage, ".xaml.htm"); if (String.IsNullOrEmpty(htmlString)) return null; return new HtmlWebViewSource() { Html = ProcessCodeHtmlString(htmlString) }; }; result.Icon = LoadPageIcon(XamlIcon); return result; }
Page CreateDescriptionPage(Page demoPage, DemoInfo info) { if (info == null) return null; HtmlViewerPage result = new HtmlViewerPage(); AssignPageTitle(result, PageDescriptionName); result.ObtainSourceDelegate = () => { string htmlString = LoadDescriptionHtml(demoPage, ".html"); if (String.IsNullOrEmpty(htmlString)) return null; return new HtmlWebViewSource() { Html = ProcessHtmlString(htmlString) }; }; result.Icon = LoadPageIcon(DescriptionIcon); return result; }