NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

RadioButton.CheckAlign

Gets or sets the location of the check box portion of the radio button control.

[Visual Basic]
Public Property CheckAlign As ContentAlignment
[C#]
public ContentAlignment CheckAlign {get; set;}
[C++]
public: __property ContentAlignment get_CheckAlign();
public: __property void set_CheckAlign(ContentAlignment);
[JScript]
public function get CheckAlign() : ContentAlignment;
public function set CheckAlign(ContentAlignment);

Property Value

One of the valid ContentAlignment values. The default value is MiddleLeft.

Exceptions

Exception Type Condition
InvalidEnumArgumentException The assigned value is not one of the ContentAlignment values.

Example [Visual Basic]

The following example demonstrates how the CheckAlign property may be changed at run time. The check box portion of a radio button control is moved to the right or left of the text when the Checked value changes. This code assumes that two RadioButton controls have been instantiated on a form.

[Visual Basic]

Private Sub RadioButton1_CheckedChanged(ByVal sender As System.Object, _
    ByVal e As System.EventArgs)
   ' Change the check box position opposite its current position.
   If RadioButton1.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft Then
      RadioButton1.CheckAlign = System.Drawing.ContentAlignment.MiddleRight
   Else
       RadioButton1.CheckAlign = System.Drawing.ContentAlignment.MiddleLeft
   End If
End Sub

See Also

RadioButton Class | RadioButton Members | System.WinForms Namespace