TextBox.CharacterCasing Vlastnost

Definice

Získá nebo nastaví způsob, jakým jsou znaky ručně zadány do textového pole.

public:
 property System::Windows::Controls::CharacterCasing CharacterCasing { System::Windows::Controls::CharacterCasing get(); void set(System::Windows::Controls::CharacterCasing value); };
public System.Windows.Controls.CharacterCasing CharacterCasing { get; set; }
member this.CharacterCasing : System.Windows.Controls.CharacterCasing with get, set
Public Property CharacterCasing As CharacterCasing

Hodnota vlastnosti

CharacterCasing

Jedna z CharacterCasing hodnot, která určuje, jak jsou ručně zadané znaky velká a velká písmena. Výchozí formát je Normal.

Příklady

Následující příklad ukazuje, jak pomocí CharacterCasing vlastnosti převést všechny ručně zadané znaky na velká písmena v textovém poli.

<Page  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
  <StackPanel>

    <!-- The CharacterCasing property of this TextBox is set to "Upper" which 
         causes all manually typed characters to be converted to uppercase. -->
    <TextBox CharacterCasing="Upper" Width="100" />
  </StackPanel>
</Page>
using System.Windows.Controls;
namespace SDKSample
{
    public partial class CharacterCasingExample : Page
    {
        public CharacterCasingExample()
        {
            StackPanel myStackPanel = new StackPanel();

            // Create TextBox.
            TextBox myTextBox = new TextBox();
            myTextBox.Width = 100;

            // The CharacterCasing property of this TextBox is set to 
            // "Upper" which causes all manually typed characters to 
            // be converted to upper case.
            myTextBox.CharacterCasing = CharacterCasing.Upper;
            myStackPanel.Children.Add(myTextBox);
            this.Content = myStackPanel;
        }
    }
}

Imports System.Windows
Imports System.Windows.Controls

Namespace SDKSample
    Partial Public Class CharacterCasingExample
        Inherits Page
        Public Sub New()
            Dim myStackPanel As New StackPanel()

            'Create TextBox
            Dim myTextBox As New TextBox()
            myTextBox.Width = 100

            ' The CharacterCasing property of this TextBox is set to 
            ' "Upper" which causes all manually typed characters to 
            ' be converted to upper case.
            myTextBox.CharacterCasing = CharacterCasing.Upper
            myStackPanel.Children.Add(myTextBox)
            Me.Content = myStackPanel
        End Sub
    End Class
End Namespace

Poznámky

Tato vlastnost nemá vliv na znaky přidané programově.

Informace o vlastnosti závislosti

Pole identifikátoru CharacterCasingProperty
Vlastnosti metadat nastavené na true Žádné

Platí pro