GroupBoxRenderer.RenderMatchingApplicationState プロパティ

定義

レンダラーがアプリケーション状態に応じて描画スタイルを決定するかどうかを示す値を取得または設定します。

public:
 static property bool RenderMatchingApplicationState { bool get(); void set(bool value); };
public static bool RenderMatchingApplicationState { get; set; }
member this.RenderMatchingApplicationState : bool with get, set
Public Shared Property RenderMatchingApplicationState As Boolean

プロパティ値

Boolean

アプリケーション状態に応じて描画スタイルを決定する場合は true。それ以外の場合は false。 既定値は、true です。

次のコード例では、プロパティを RenderMatchingApplicationState 使用して、visual スタイルを使用してグループ ボックスをレンダリングするかどうかを変更します。 このコード例は、GroupBoxRenderer クラスのために提供されている大規模な例の一部です。


// Match application style and toggle visual styles off
// and on for the application.
    private void button1_Click(object sender, EventArgs e)
    {
        GroupBoxRenderer.RenderMatchingApplicationState = true;
        Application.VisualStyleState = 
            Application.VisualStyleState ^ 
            VisualStyleState.ClientAndNonClientAreasEnabled;

        if (Application.RenderWithVisualStyles)
            this.Text = "Visual Styles Enabled";
        else
            this.Text = "Visual Styles Disabled";
    }
' Match application style and toggle visual styles off
' and on for the application.
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) _
    Handles button1.Click

    GroupBoxRenderer.RenderMatchingApplicationState = True

    Application.VisualStyleState = _
        Application.VisualStyleState Xor _
        VisualStyleState.ClientAndNonClientAreasEnabled

    If Application.RenderWithVisualStyles Then
        Me.Text = "Visual Styles Enabled"
    Else
        Me.Text = "Visual Styles Disabled"
    End If

End Sub

注釈

ある場合 RenderMatchingApplicationStatetrueGroupBoxRenderer 設定を Application.RenderWithVisualStyles 使用してレンダリング スタイルを決定します。 あるfalse場合RenderMatchingApplicationState、レンダラーは常にビジュアル スタイルを使用してレンダリングされます。

適用対象