'WPF Dependency Property xaml add suggestion / option list

I have a control where i want to add CharacterCasing since it doesn't support it by default.

I added a custom dependency property called "CharacterCasing". Now when i use it in xaml i want to have the options just like in the normal TextBox:

Example how i want it to look like

Any ideas how to implement the suggestion list in the dependency property?

This is my code in xaml:

<TestControl:APTextBox CharacterCasing="UpperCase" Text="{Binding AktuelleZeile.LKR, Mode=TwoWay, NotifyOnValidationError=True, ValidatesOnDataErrors=True}">

And this is the dependency property:

public static readonly DependencyProperty CharacterCasingProperty =
      DependencyProperty.Register(name: "CharacterCasing",
                                   propertyType: typeof(string),
                                   ownerType: typeof(APTextBox),
                                   typeMetadata: new PropertyMetadata("Normal"));

public string CharacterCasing
{
    get { return (string)this.GetValue(CharacterCasingProperty); }
    set { this.SetValue(CharacterCasingProperty, value); }
}


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source