VisualStyleElement.Button.CheckBox 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
확인란 컨트롤의 다양한 상태에 대한 개체를 제공합니다 VisualStyleElement . 이 클래스는 상속할 수 없습니다.
public: ref class VisualStyleElement::Button::CheckBox abstract sealed
public static class VisualStyleElement.Button.CheckBox
type VisualStyleElement.Button.CheckBox = class
Public Class VisualStyleElement.Button.CheckBox
- 상속
-
VisualStyleElement.Button.CheckBox
예제
다음 코드 예제에서는 속성에서 반환 된 사용 하 여 VisualStyleRendererVisualStyleElement 만드는 방법을 보여 줍니다 VisualStyleElement.Button.CheckBox . 이 예제를 실행하려면 Windows Form에 붙여넣습니다. 양식의 Paint 이벤트를 처리하고 이벤트 처리 메서드에서 DrawVisualStyleElement_Button_CheckBox1 메서드를 호출 Paint 하여 다음과 같이 e전달 PaintEventArgs 합니다.
public void DrawVisualStyleElement_Button_CheckBox1(PaintEventArgs e)
{
if (VisualStyleRenderer.IsElementDefined(
VisualStyleElement.Button.CheckBox.UncheckedNormal))
{
VisualStyleRenderer renderer =
new VisualStyleRenderer(VisualStyleElement.Button.CheckBox.UncheckedNormal);
Rectangle rectangle1 = new Rectangle(10, 50, 50, 50);
renderer.DrawBackground(e.Graphics, rectangle1);
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.UncheckedNormal",
this.Font, Brushes.Black, new Point(10, 10));
}
else
e.Graphics.DrawString("This element is not defined in the current visual style.",
this.Font, Brushes.Black, new Point(10, 10));
}
Public Sub DrawVisualStyleElement_Button_CheckBox1(ByVal e As PaintEventArgs)
If (VisualStyleRenderer.IsElementDefined( _
VisualStyleElement.Button.CheckBox.UncheckedNormal)) Then
Dim renderer As New VisualStyleRenderer _
(VisualStyleElement.Button.CheckBox.UncheckedNormal)
Dim rectangle1 As New Rectangle(10, 50, 50, 50)
renderer.DrawBackground(e.Graphics, rectangle1)
e.Graphics.DrawString("VisualStyleElement.Button.CheckBox.UncheckedNormal", _
Me.Font, Brushes.Black, New Point(10, 10))
Else
e.Graphics.DrawString("This element is not defined in the current visual style.", _
Me.Font, Brushes.Black, New Point(10, 10))
End If
End Sub
설명
클래스의 각 속성은 VisualStyleElement.Button.CheckBoxVisualStyleElement 확인란 컨트롤의 다른 상태에 대한 값을 반환합니다.
속성
| Name | Description |
|---|---|
| CheckedDisabled |
선택된 상태의 비활성화된 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| CheckedHot |
선택한 상태의 핫 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| CheckedNormal |
선택된 상태의 기본 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| CheckedPressed |
선택된 상태의 누른 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| MixedDisabled |
확정되지 않은 상태의 비활성화된 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| MixedHot |
확정되지 않은 상태의 핫 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| MixedNormal |
확정되지 않은 상태의 일반 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| MixedPressed |
확정되지 않은 상태의 누른 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| UncheckedDisabled |
선택되지 않은 상태의 비활성화된 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| UncheckedHot |
선택되지 않은 상태의 핫 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| UncheckedNormal |
선택되지 않은 상태의 일반 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |
| UncheckedPressed |
선택되지 않은 상태의 누른 확인란을 나타내는 비주얼 스타일 요소를 가져옵니다. |