HtmlTextWriterStyle HtmlTextWriterStyle HtmlTextWriterStyle HtmlTextWriterStyle Enum

定義

指定可用於 HtmlTextWriterHtml32TextWriter 物件輸出資料流的 HTML 樣式。Specifies the HTML styles available to an HtmlTextWriter or Html32TextWriter object output stream.

public enum class HtmlTextWriterStyle
public enum HtmlTextWriterStyle
type HtmlTextWriterStyle = 
Public Enum HtmlTextWriterStyle
繼承
HtmlTextWriterStyleHtmlTextWriterStyleHtmlTextWriterStyleHtmlTextWriterStyle

欄位

BackgroundColor BackgroundColor BackgroundColor BackgroundColor 0

指定 HTML backgroundcolor 樣式。Specifies the HTML backgroundcolor style.

BackgroundImage BackgroundImage BackgroundImage BackgroundImage 1

指定 HTML backgroundimage 樣式。Specifies the HTML backgroundimage style.

BorderCollapse BorderCollapse BorderCollapse BorderCollapse 2

指定 HTML bordercollapse 樣式。Specifies the HTML bordercollapse style.

BorderColor BorderColor BorderColor BorderColor 3

指定 HTML bordercolor 樣式。Specifies the HTML bordercolor style.

BorderStyle BorderStyle BorderStyle BorderStyle 4

指定 HTML borderstyle 樣式。Specifies the HTML borderstyle style.

BorderWidth BorderWidth BorderWidth BorderWidth 5

指定 HTML borderwidth 樣式。Specifies the HTML borderwidth style.

Color Color Color Color 6

指定 HTML color 樣式。Specifies the HTML color style.

Cursor Cursor Cursor Cursor 16

指定 HTML cursor 樣式。Specifies the HTML cursor style.

Direction Direction Direction Direction 17

指定 HTML direction 樣式。Specifies the HTML direction style.

Display Display Display Display 18

指定 HTML display 樣式。Specifies the HTML display style.

Filter Filter Filter Filter 19

指定 HTML filter 樣式。Specifies the HTML filter style.

FontFamily FontFamily FontFamily FontFamily 7

指定 HTML fontfamily 樣式。Specifies the HTML fontfamily style.

FontSize FontSize FontSize FontSize 8

指定 HTML fontsize 樣式。Specifies the HTML fontsize style.

FontStyle FontStyle FontStyle FontStyle 9

指定 HTML fontstyle 樣式。Specifies the HTML fontstyle style.

FontVariant FontVariant FontVariant FontVariant 20

指定 HTML fontvariant 樣式。Specifies the HTML fontvariant style.

FontWeight FontWeight FontWeight FontWeight 10

指定 HTML fontheight 樣式。Specifies the HTML fontheight style.

Height Height Height Height 11

指定 HTML height 樣式。Specifies the HTML height style.

Left Left Left Left 21

指定 HTML left 樣式。Specifies the HTML left style.

ListStyleImage ListStyleImage ListStyleImage ListStyleImage 14

指定 HTML liststyleimage 樣式。Specifies the HTML liststyleimage style.

ListStyleType ListStyleType ListStyleType ListStyleType 15

指定 HTML liststyletype 樣式。Specifies the HTML liststyletype style.

Margin Margin Margin Margin 22

指定 HTML margin 樣式。Specifies the HTML margin style.

MarginBottom MarginBottom MarginBottom MarginBottom 23

指定 HTML marginbottom 樣式。Specifies the HTML marginbottom style.

MarginLeft MarginLeft MarginLeft MarginLeft 24

指定 HTML marginleft 樣式。Specifies the HTML marginleft style.

MarginRight MarginRight MarginRight MarginRight 25

指定 HTML marginright 樣式。Specifies the HTML marginright style.

MarginTop MarginTop MarginTop MarginTop 26

指定 HTML margintop 樣式。Specifies the HTML margintop style.

Overflow Overflow Overflow Overflow 27

指定 HTML overflow 樣式。Specifies the HTML overflow style.

OverflowX OverflowX OverflowX OverflowX 28

指定 HTML overflowx 樣式。Specifies the HTML overflowx style.

OverflowY OverflowY OverflowY OverflowY 29

指定 HTML overflowy 樣式。Specifies the HTML overflowy style.

Padding Padding Padding Padding 30

指定 HTML padding 樣式。Specifies the HTML padding style.

PaddingBottom PaddingBottom PaddingBottom PaddingBottom 31

指定 HTML paddingbottom 樣式。Specifies the HTML paddingbottom style.

PaddingLeft PaddingLeft PaddingLeft PaddingLeft 32

指定 HTML paddingleft 樣式。Specifies the HTML paddingleft style.

PaddingRight PaddingRight PaddingRight PaddingRight 33

指定 HTML paddingright 樣式。Specifies the HTML paddingright style.

PaddingTop PaddingTop PaddingTop PaddingTop 34

指定 HTML paddingtop 樣式。Specifies the HTML paddingtop style.

Position Position Position Position 35

指定 HTML position 樣式。Specifies the HTML position style.

TextAlign TextAlign TextAlign TextAlign 36

指定 HTML textalign 樣式。Specifies the HTML textalign style.

TextDecoration TextDecoration TextDecoration TextDecoration 12

指定 HTML textdecoration 樣式。Specifies the HTML textdecoration style.

TextOverflow TextOverflow TextOverflow TextOverflow 38

指定 HTML textoverflow 樣式。Specifies the HTML textoverflow style.

Top Top Top Top 39

指定 HTML top 樣式。Specifies the HTML top style.

VerticalAlign VerticalAlign VerticalAlign VerticalAlign 37

指定 HTML verticalalign 樣式。Specifies the HTML verticalalign style.

Visibility Visibility Visibility Visibility 40

指定 HTML visibility 樣式。Specifies the HTML visibility style.

WhiteSpace WhiteSpace WhiteSpace WhiteSpace 41

指定 HTML whitespace 樣式。Specifies the HTML whitespace style.

Width Width Width Width 13

指定 HTML width 樣式。Specifies the HTML width style.

ZIndex ZIndex ZIndex ZIndex 42

指定 HTML zindex 樣式。Specifies the HTML zindex style.

範例

下列範例會使用HtmlTextWriterStyle列舉AddStyleAttribute搭配方法, 將color樣式屬性加入至 HTML 元素並設定其值。The following example uses the HtmlTextWriterStyle enumeration with the AddStyleAttribute method to add a color style attribute to an HTML element and sets its value.

writer->AddStyleAttribute( HtmlTextWriterStyle::Color, "Red" );
writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "Red");
writer.AddStyleAttribute(HtmlTextWriterStyle.Color, "Red")

備註

HtmlTextWriterHtml32TextWriter物件會使用這些列舉值, 將 html 字串註冊為適當的 html 樣式。HtmlTextWriter and Html32TextWriter objects use these enumeration values to register HTML strings to the proper HTML style.

適用於

另請參閱