Properties

The properties available under WPF HTML Editor are listed below along with a brief explanation:

public string BackgroundImagePath { get; set; } : Gets or Sets the Background Image Path.

public string BaseUrl { get; set; } : Gets or Sets the Base url of the Document.

public Color BodyColor { get; set; } : Gets or Sets the color of the body of the HTML Editor Control's HTML Document.

public string BodyCSSClassName { get; set; } : Gets or Sets the Value of the "Style" Attribute of the Document's Body Tag.

public string BodyHtml { get; set; } : Gets or sets the body HTML.

public string BodyStyle { get; set; } : Gets or Sets the Value of the "Style" Attribute of the Document's Body Tag.

public mshtml.IHTMLStyle BodyStyleAsDOM { get; } : Gets or Sets the Value of the "Style" Attribute of the Document's Body Tag.

public string Charset { get; set; } : Gets or Sets the charset of the document. The default value is Unicode.

public string DefaultFontFamily { get; set; } : Gets or sets the Default Font Family style for the Document Body. This value will be persisted in the style attribute of the Body Element. The default value is Times New Roman.

public string DefaultFontSizeInPt { get; set; } : Gets or sets the size of the body font. Please provide the font size number with 'pt' unit. Otherwise, it will consider the number as 'px' unit and automatically convert that px unit font size to pt unit and show the result with 'pt' unit conversion. For example, if you enter just the word 15, then the editor will assume that you entered 15px and as 15px = 11pt, it will show 11pt. If yu really wanted to set 15pt, then, please enter 15pt. This value will be persisted in the style attribute of the Body Element. The default value is 12 pt.

public Color DefaultForeColor { get; set; } : Gets or sets the default fore color of the editor. This value will be persisted in the style attribute of the Body Element. The default color is Black.

public string DocumentCSSFilePath { get; set; }: Gets or sets the document CSS file path.

public string DocumentHtml { get; set; } : Gets or sets the document HTML.

public string DocumentTitle { get; set; } : Gets or Sets the title of the Html Document.

public Color EditorBorderColor { get; set; } : Gets or sets Color of the Editor border.

public Thickness EditorBorderWidth { get; set; } : Gets or sets the width of the Editor border. You can set it = 0 so that the border will not be visible.

public EditorModes EditorMode { get; set; } : Gets or sets the startup mode. The modes available are WYSIWYG, HTML Edit and ReadOnly Preview.

public bool Focused { get; } : See if the Editor is focused.

public string HeaderStyleContent { get; set; } : Gets or sets the content of the header style.

public string HeaderStyleContentElementID { get; set; } : Gets or sets the header style content element ID.

public int HorizontalScrollPosition { get; } : Gets the horizontal scroll position.

public string ProductVersion { get; } : Gets the product version which is same as Assembly version.

public ScrollBarVisibility ScrollBarSetting { get; set; } : Gets or sets the scroll bar setting. The options available are Disabled, Auto, Hidden and Visible.

public System.Drawing.Rectangle ScrollRectangle { get; } : Gets the dimension of the editor's scrollable region.

public int VerticalScrollPosition { get; } : Gets the vertical scroll position.

public bool WordWrap { get; set; } : This value indicates if the lines are automatically word-wrapped; if set to False then it collapses whitespace as for 'normal', but suppresses line breaks within text except for those created by "\A" in generated content (e.g., for the BR element in HTML)


                            
Last updated on 29 May 2015, Friday, 1:07:53 PM
If you have any questions or concerns about this tutorial, Please feel free to share your comment.