RadioButtonRenderer.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.
oluşturucunun 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, uygulama durumuna bağlı olarak işleme stilinin değiştiğini göstermek için özelliğini kullanır RenderMatchingApplicationState . Bu kod örneği, sınıfı için RadioButtonRenderer sağlanan daha büyük bir örneğin parçasıdır.
private void button1_Click(object sender, EventArgs e)
{
Application.VisualStyleState =
Application.VisualStyleState ^
VisualStyleState.ClientAndNonClientAreasEnabled;
GroupBoxRenderer.RenderMatchingApplicationState = true;
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
RadioButtonRenderer.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
RenderMatchingApplicationState özelliği isetrue
, RadioButtonRenderer işleme stilini belirlemek için özelliğinden Application.RenderWithVisualStyles ayarını kullanır. ise RenderMatchingApplicationState false
, işleyici her zaman görsel stilleri kullanarak işlenir.