且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

DatePickerTextBox切换日期和月份

更新时间:2023-01-29 09:40:16

由于文化差异

定义以下xml命名空间:

Define the following xml namespace:

xmlns:gl="clr-namespace:System.Globalization;assembly=mscorlib"

指定与您相关的文化信息

Specifiy the culture info relevant to you

<DatePickerTextBox Text="{Binding Path=dateOfBirth, 
                                  StringFormat=dd-MM-yyyy,
                                  ConverterCulture={x:Static gl:CultureInfo.CurrentCulture}" />