I have a textbox displaying a date and time from a DateTime object like this:
<TextBox Text="{Binding MyDate,StringFormat=dd.MM.yyyy HH:mm:ss}"/>
How can I create a custom textbox, call it DateTextBox, that displays the date already formatted, like this:
<DateTextBoxText="{Binding MyDate}"/>
If possible, please seriously consider using a better design, such as utilizing DateTimePicker,
http://wpftoolkit.codeplex.com/wikipage?title=DateTimePicker
Writing your own TextBox is error prone and inconvenient for your users.