TabRenderer.DrawTabItem TabRenderer.DrawTabItem TabRenderer.DrawTabItem TabRenderer.DrawTabItem Method

定义

绘制用于在选项卡控件中选择页的选项卡。Draws a tab that is used to select a page in the tab control.

重载

DrawTabItem(Graphics, Rectangle, TabItemState) DrawTabItem(Graphics, Rectangle, TabItemState) DrawTabItem(Graphics, Rectangle, TabItemState) DrawTabItem(Graphics, Rectangle, TabItemState)

绘制具有指定状态和边界的选项卡。Draws a tab in the specified state and bounds.

DrawTabItem(Graphics, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, and with an optional focus rectangle.

DrawTabItem(Graphics, Rectangle, String, Font, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TabItemState)

绘制具有指定的状态和边界以及指定的文本的选项卡。Draws a tab in the specified state and bounds, and with the specified text.

DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的图像以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified image, and with an optional focus rectangle.

DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified text, and with an optional focus rectangle.

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本和文本格式以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified text and text formatting, and with an optional focus rectangle.

DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本和图像以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified text and image, and with an optional focus rectangle.

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本、文本格式和图像以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds; with the specified text, text formatting, and image; and with an optional focus rectangle.

DrawTabItem(Graphics, Rectangle, TabItemState) DrawTabItem(Graphics, Rectangle, TabItemState) DrawTabItem(Graphics, Rectangle, TabItemState) DrawTabItem(Graphics, Rectangle, TabItemState)

绘制具有指定状态和边界的选项卡。Draws a tab in the specified state and bounds.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, state As TabItemState)

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, and with an optional focus rectangle.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit
Public Shared Sub DrawTabItem (g As Graphics, bounds As Rectangle, focused As Boolean, state As TabItemState)

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

focused
Boolean Boolean Boolean Boolean

若要绘制一个聚焦框,则为 true;否则为 falsetrue to draw a focus rectangle; otherwise, false.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, String, Font, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TabItemState)

绘制具有指定的状态和边界以及指定的文本的选项卡。Draws a tab in the specified state and bounds, and with the specified text.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.VisualStyles.TabItemState -> unit

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

tabItemText
String String String String

要在选项卡中绘制的 StringThe String to draw in the tab.

font
Font Font Font Font

要应用于 tabItemTextFontThe Font to apply to tabItemText.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, Image, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的图像以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified image, and with an optional focus rectangle.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::Drawing::Image ^ image, System::Drawing::Rectangle imageRectangle, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

image
Image Image Image Image

要在选项卡中绘制的 ImageThe Image to draw in the tab.

imageRectangle
Rectangle Rectangle Rectangle Rectangle

指定 image 边界的 RectangleThe Rectangle that specifies the bounds of image.

focused
Boolean Boolean Boolean Boolean

若要绘制一个聚焦框,则为 true;否则为 falsetrue to draw a focus rectangle; otherwise, false.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified text, and with an optional focus rectangle.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

tabItemText
String String String String

要在选项卡中绘制的 StringThe String to draw in the tab.

font
Font Font Font Font

要应用于 tabItemTextFontThe Font to apply to tabItemText.

focused
Boolean Boolean Boolean Boolean

若要绘制一个聚焦框,则为 true;否则为 falsetrue to draw a focus rectangle; otherwise, false.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

示例

下面的代码示例使用DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState)方法在自定义控件的OnPaint方法,以便绘制选项卡。The following code example uses the DrawTabItem(Graphics, Rectangle, String, Font, Boolean, TabItemState) method in a custom control's OnPaint method to draw a tab item. 此代码示例是为提供一个更大示例的一部分TabRenderer类。This code example is part of a larger example provided for the TabRenderer class.

    // Draw the tab page and the tab items.
protected:
    virtual void OnPaint(PaintEventArgs^ e) override
    {
        __super::OnPaint(e);

        if (!TabRenderer::IsSupported)
        {
            this->Parent->Text = "CustomTabControl Disabled";
            return;
        }

        TabRenderer::DrawTabPage(e->Graphics, tabPageRectangle);
        TabRenderer::DrawTabItem(e->Graphics, tabItemRectangle1,
            tab1Text, this->Font, tab1Focused, tab1State);
        TabRenderer::DrawTabItem(e->Graphics, tabItemRectangle2,
            tab2Text, this->Font, tab2Focused, tab2State);

        this->Parent->Text = "CustomTabControl Enabled";
    }
// Draw the tab page and the tab items.
protected override void OnPaint(PaintEventArgs e)
{
    base.OnPaint(e);

    if (!TabRenderer.IsSupported)
    {
        this.Parent.Text = "CustomTabControl Disabled";
        return;
    }

    TabRenderer.DrawTabPage(e.Graphics, tabPageRectangle);
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle1,
        tab1Text, this.Font, tab1Focused, tab1State);
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle2,
        tab2Text, this.Font, tab2Focused, tab2State);

    this.Parent.Text = "CustomTabControl Enabled";
}
' Draw the tab page and the tab items.
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
    MyBase.OnPaint(e)

    If Not TabRenderer.IsSupported Then
        Me.Parent.Text = "CustomTabControl Disabled"
        Return
    End If

    TabRenderer.DrawTabPage(e.Graphics, tabPageRectangle)
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle1, _
        tab1Text, Me.Font, tab1Focused, tab1State)
    TabRenderer.DrawTabItem(e.Graphics, tabItemRectangle2, _
        tab2Text, Me.Font, tab2Focused, tab2State)
    Me.Parent.Text = "CustomTabControl Enabled"
End Sub

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本和文本格式以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified text and text formatting, and with an optional focus rectangle.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

tabItemText
String String String String

要在选项卡中绘制的 StringThe String to draw in the tab.

font
Font Font Font Font

要应用于 tabItemTextFontThe Font to apply to tabItemText.

flags
TextFormatFlags TextFormatFlags TextFormatFlags TextFormatFlags

TextFormatFlags 值的按位组合。A bitwise combination of the TextFormatFlags values.

focused
Boolean Boolean Boolean Boolean

若要绘制一个聚焦框,则为 true;否则为 falsetrue to draw a focus rectangle; otherwise, false.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, Image, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本和图像以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds, with the specified text and image, and with an optional focus rectangle.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Drawing::Image ^ image, System::Drawing::Rectangle imageRectangle, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

tabItemText
String String String String

要在选项卡中绘制的 StringThe String to draw in the tab.

font
Font Font Font Font

要应用于 tabItemTextFontThe Font to apply to tabItemText.

image
Image Image Image Image

要在选项卡中绘制的 ImageThe Image to draw in the tab.

imageRectangle
Rectangle Rectangle Rectangle Rectangle

指定 image 边界的 RectangleThe Rectangle that specifies the bounds of image.

focused
Boolean Boolean Boolean Boolean

若要绘制一个聚焦框,则为 true;否则为 falsetrue to draw a focus rectangle; otherwise, false.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState) DrawTabItem(Graphics, Rectangle, String, Font, TextFormatFlags, Image, Rectangle, Boolean, TabItemState)

绘制具有指定的状态和边界、指定的文本、文本格式和图像以及可选聚焦框的选项卡。Draws a tab in the specified state and bounds; with the specified text, text formatting, and image; and with an optional focus rectangle.

public:
 static void DrawTabItem(System::Drawing::Graphics ^ g, System::Drawing::Rectangle bounds, System::String ^ tabItemText, System::Drawing::Font ^ font, System::Windows::Forms::TextFormatFlags flags, System::Drawing::Image ^ image, System::Drawing::Rectangle imageRectangle, bool focused, System::Windows::Forms::VisualStyles::TabItemState state);
public static void DrawTabItem (System.Drawing.Graphics g, System.Drawing.Rectangle bounds, string tabItemText, System.Drawing.Font font, System.Windows.Forms.TextFormatFlags flags, System.Drawing.Image image, System.Drawing.Rectangle imageRectangle, bool focused, System.Windows.Forms.VisualStyles.TabItemState state);
static member DrawTabItem : System.Drawing.Graphics * System.Drawing.Rectangle * string * System.Drawing.Font * System.Windows.Forms.TextFormatFlags * System.Drawing.Image * System.Drawing.Rectangle * bool * System.Windows.Forms.VisualStyles.TabItemState -> unit

参数

g
Graphics Graphics Graphics Graphics

用于绘制选项卡的 GraphicsThe Graphics used to draw the tab.

bounds
Rectangle Rectangle Rectangle Rectangle

用于指定选项卡边界的 RectangleThe Rectangle that specifies the bounds of the tab.

tabItemText
String String String String

要在选项卡中绘制的 StringThe String to draw in the tab.

font
Font Font Font Font

要应用于 tabItemTextFontThe Font to apply to tabItemText.

flags
TextFormatFlags TextFormatFlags TextFormatFlags TextFormatFlags

TextFormatFlags 值的按位组合。A bitwise combination of the TextFormatFlags values.

image
Image Image Image Image

要在选项卡中绘制的 ImageThe Image to draw in the tab.

imageRectangle
Rectangle Rectangle Rectangle Rectangle

指定 image 边界的 RectangleThe Rectangle that specifies the bounds of image.

focused
Boolean Boolean Boolean Boolean

若要绘制一个聚焦框,则为 true;否则为 falsetrue to draw a focus rectangle; otherwise, false.

state
TabItemState TabItemState TabItemState TabItemState

TabItemState 值之一,它指定选项卡的可视状态。One of the TabItemState values that specifies the visual state of the tab.

异常

操作系统不支持视觉样式。The operating system does not support visual styles.

-or- 用户在操作系统中禁用视觉样式。Visual styles are disabled by the user in the operating system.

-or- 视觉样式不应用于应用程序窗口的工作区。Visual styles are not applied to the client area of application windows.

注解

调用此方法之前,应验证IsSupported属性返回trueBefore calling this method, you should verify that the IsSupported property returns true.

适用于