다음을 통해 공유


RadioButton.Appearance 속성

RadioButton의 모양을 결정하는 값을 가져오거나 설정합니다.

네임스페이스: System.Windows.Forms
어셈블리: System.Windows.Forms(system.windows.forms.dll)

구문

‘선언
<LocalizableAttribute(True)> _
Public Property Appearance As Appearance
‘사용 방법
Dim instance As RadioButton
Dim value As Appearance

value = instance.Appearance

instance.Appearance = value
[LocalizableAttribute(true)] 
public Appearance Appearance { get; set; }
[LocalizableAttribute(true)] 
public:
property Appearance Appearance {
    Appearance get ();
    void set (Appearance value);
}
/** @property */
public Appearance get_Appearance ()

/** @property */
public void set_Appearance (Appearance value)
public function get Appearance () : Appearance

public function set Appearance (value : Appearance)

속성 값

Appearance 값 중 하나입니다. 기본값은 Normal입니다.

예외

예외 형식 조건

InvalidEnumArgumentException

할당된 값이 Appearance 값 중 하나가 아닌 경우

설명

Appearance 값이 Normal로 설정되면 RadioButton 컨트롤이 원형 확인란으로 그려집니다. 이 값이 Button으로 설정되면 RadioButton이 up 또는 down 상태로 전환할 수 있는 컨트롤로 그려집니다. 각 형식에는 텍스트, 이미지 또는 모두를 표시할 수 있습니다.

예제

다음 코드 예제에서는 RadioButton을 만들어 초기화하고 토글 컨트롤 모양으로 만든 다음 AutoCheck 속성을 false로 설정하여 Form에 추가합니다.

Private Sub InitializeMyRadioButton()
    ' Create and initialize a new RadioButton. 
    Dim radioButton1 As New RadioButton()
       
    ' Make the radio button control appear as a toggle button.
    radioButton1.Appearance = Appearance.Button
       
    ' Turn off the update of the display on the click of the control.
    radioButton1.AutoCheck = False
       
    ' Add the radio button to the form.
    Controls.Add(radioButton1)
End Sub
private void InitializeMyRadioButton()
{
   // Create and initialize a new RadioButton. 
   RadioButton radioButton1 = new RadioButton();
   
   // Make the radio button control appear as a toggle button.
   radioButton1.Appearance = Appearance.Button;

   // Turn off the update of the display on the click of the control.
   radioButton1.AutoCheck = false;

   // Add the radio button to the form.
   Controls.Add(radioButton1);
}
private void InitializeMyRadioButton()
{
    // Create and initialize a new RadioButton. 
    RadioButton radioButton1 = new RadioButton();

    // Make the radio button control appear as a toggle button.
    radioButton1.set_Appearance(Appearance.Button);

    // Turn off the update of the display on the click of the control.
    radioButton1.set_AutoCheck(false);
    
    // Add the radio button to the form.
    get_Controls().Add(radioButton1);
} //InitializeMyRadioButton

플랫폼

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework에서 모든 플래폼의 모든 버전을 지원하지는 않습니다. 지원되는 버전의 목록은 시스템 요구 사항을 참조하십시오.

버전 정보

.NET Framework

2.0, 1.1, 1.0에서 지원

참고 항목

참조

RadioButton 클래스
RadioButton 멤버
System.Windows.Forms 네임스페이스
Appearance 열거형