GroupBoxRenderer.RenderMatchingApplicationState Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
İşleyicinin işleme stilini belirlemek için uygulama durumunu kullanıp kullanmadığını belirten bir değer alır veya ayarlar.
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
Özellik Değeri
true
işleme stilini belirlemek için uygulama durumu kullanılıyorsa; aksi takdirde , false
. Varsayılan değer: true
.
Örnekler
Aşağıdaki kod örneği, bir grup kutusunun görsel stiller kullanılarak işlenip işlenmeyeceğini değiştirmek için özelliğini kullanır RenderMatchingApplicationState . Bu kod örneği, sınıfı için GroupBoxRenderer sağlanan daha büyük bir örneğin parçasıdır.
// 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
Açıklamalar
ise RenderMatchingApplicationState true
, işleme GroupBoxRenderer stilini belirlemek için ayarını Application.RenderWithVisualStyles kullanır. ise RenderMatchingApplicationState false
, işleyici her zaman görsel stilleri kullanarak işlenir.