public void AddStyleSheetRequest(TextRequestEventArgs arg) { this.StylesheetLoadingRequest(this, arg); }
/// <summary> /// Handle stylesheet resolve. /// </summary> void HandleStylesheetRequest(object sender, TextRequestEventArgs e) { var stylesheet = GetBuiltInStyleSheet(e.Src); if (stylesheet != null) { e.TextContent = stylesheet; } else { //load external style sheet //beware request destination and request origin //check style sheet ... string fullStyleSheetFilename = this.htmlRootFolder + "\\" + e.Src; if (File.Exists(fullStyleSheetFilename)) { e.TextContent = File.ReadAllText(fullStyleSheetFilename); } } }