TabRenderer.IsSupported プロパティとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > TabRenderer.IsSupported プロパティの意味・解説 

TabRenderer.IsSupported プロパティ

メモ : このプロパティは、.NET Framework version 2.0新しく追加されたものです。

visual スタイル使用してタブ コントロール描画するために TabRenderer クラス使用できるかどうかを示す値を取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

解説解説

このプロパティfalse場合、DrawTabPage メソッドおよび DrawTabItem メソッドは InvalidOperationException をスローます。

使用例使用例

IsSupported プロパティ使用してDrawTabPage メソッドおよび DrawTabItem メソッド使用するかどうか判断するコード例次に示します。このコード例は、TabRenderer クラストピック取り上げているコード例一部分です。

' 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

// 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:
    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";
    }
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
TabRenderer クラス
TabRenderer メンバ
System.Windows.Forms 名前空間
Application.VisualStyleState プロパティ



英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

「TabRenderer.IsSupported プロパティ」の関連用語

TabRenderer.IsSupported プロパティのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



TabRenderer.IsSupported プロパティのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS