/// <summary> /// Create a html button to display custom messages /// </summary> /// <param name="htmlElement"></param> /// <returns></returns> public static System.Windows.Browser.HtmlElement GetDisplayMessageButton(System.Windows.Browser.HtmlElement htmlElement) { htmlElement = System.Windows.Browser.HtmlPage.Document.CreateElement("input"); htmlElement.SetProperty("id", "inputText"); htmlElement.SetProperty("type", "button"); htmlElement.SetStyleAttribute("border", "solid 1px black"); htmlElement.SetStyleAttribute("position", "absolute"); htmlElement.SetStyleAttribute("width", "900px"); htmlElement.SetStyleAttribute("height", "20px"); htmlElement.SetStyleAttribute("top", "520px"); htmlElement.SetStyleAttribute("left", "0px"); return(htmlElement); }
public void NavigateToHtml(String To) { #if SILVERLIGHT System.Windows.Browser.HtmlElement element = System.Windows.Browser.HtmlPage.Document.GetElementById("Comments"); if (element != null) { element.SetProperty("src", string.Format("source/{0}", To)); } #else Stream s = GetStream("source." + To, "html"); if (s != null) { myComment.NavigateToStream(s); } #endif }