万事屋软件科技

winform-HTML Text Formatting

Tags are enclosed with the '<' and '>' symbols, and typically have a corresponding end tag. If a tag is not matched by its ending counterpart, all text that follows the tag will be formatted accordingly.

The following tags are supported:

TagEnd TagDescription
<br>-Inserts a single line break. To use this tag, you should enable word wrapping via theTextOptions.WordWrap option of a corresponding appearance object.

To use this tag in a GridControl, enable word wrapping via theGridViewAppearances.HeaderPanel object, GridColumn.AppearanceHeader object,BandedViewAppearances.BandPanel object or GridBand.AppearanceHeader object.

To use this tag in a TreeList, enable word wrapping via theTreeListAppearanceCollection.HeaderPanel object or TreeListColumn.AppearanceHeaderobject.

To use this tag in a LabelControl, enable word wrapping via the LabelControl.Appearanceobject.

To use this tag in a CheckEdit control, enable word wrapping via theCheckEdit.Properties.Appearance object (RepositoryItem.Appearance).

To use this tag in layout item captions, enable word wrapping via the item's or layout group'sBaseLayoutItem.AppearanceItemCaption object.

<color=value>
Examples:
<color=red> 
<color=0,255,0>
<color=#0000FF>
</color>Specifies the text color.
<backcolor=value>
Examples:
<backcolor=red> 
<backcolor=0,255,0>
<backcolor=#0000FF>
</backcolor>Specifies the background color.
<size=value>
Examples:
<size=10> 
<size=+4>
<size=-4>
</size>Specifies the font size.
<b></b>Defines bold text.
<i></i>Defines italic text.
<s></s>Defines strikethrough text.
<u></u>Defines underlined text.
<image=value>
Examples:
<image=UpArrow.png> 
<image=#LeftArrow.png> 
<image=DownArrow.png;size=20,20;align=top>
-Inserts an image from a bound image collection or from project resources. To insert an image from project resources, the image's name must be preceded with the '#' character. The image referenced from project resources will not appear at design time, but will appear at runtime.

If the image's name is not preceded with '#', it is implied that the image should be loaded by its name from a bound image collection. Use the control's HtmlImages property to provide an ImageCollection containing images to be inserted using the image tag.

The following attributes for the image tag are supported.

size - sets the display size of the image.
align - specifies the vertical alignment of the image relative to the text. Possible values: top,bottom and center.
Attributes must be specified after the tag's value, followed by the ";" character. They must be separated with ";", and specified without spaces.

Controls that accept the image tag and provide the HtmlImages property are listed below.

<href=value> 
Example: 
<href=www.devexpress.com>Our web site</href>
</href>Displays a hyperlink. The value string specifies the hyperlink source, and the string between the opening and closing tags is the text to be displayed. For controls capable of displaying hyperlinks via this tag, clicking a hyperlink fires the HyperlinkClick event.
<nbsp>-Inserts a non-breaking space character (0xA0).


上一篇:soho程序员
下一篇:Bootstrop-Buttons