英語で読む

次の方法で共有


RadioButton.Appearance プロパティ

定義

RadioButton の外観を指定する値を取得または設定します。

public System.Windows.Forms.Appearance Appearance { get; set; }

プロパティ値

Appearance 値のいずれか 1 つ。 既定値は Normal です。

例外

代入された値が、Appearance 値ではありません。

次のコード例では、 を RadioButton作成して初期化し、トグル コントロールの外観を指定し、その AutoCheck プロパティを に false設定し、 に Form追加します。

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);
}

注釈

値が AppearanceNormalRadioButton設定されている場合、コントロールは循環チェック ボックスで描画されます。 値が にButtonRadioButton設定されている場合、 は、上下の状態に切り替えることができるコントロールとして描画されます。 どちらの種類でも、テキスト、画像、またはその両方を表示できます。

適用対象

製品 バージョン
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

こちらもご覧ください