WPF工具包,如何申请日期格式在C#中的日期选择控件? [英] WPF Toolkit, How to apply date format in C# for datepicker control?
本文介绍了WPF工具包,如何申请日期格式在C#中的日期选择控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
WPF工具包,如何申请日期格式在C#中的日期选择控件?
WPF Toolkit, How to apply date format in C# for datepicker control?
推荐答案
我找到了解决的方法之一我的问题通过文化
I found the one way to solve of my problem by using the culture
System.Globalization.CultureInfo culInfo = new System.Globalization.CultureInfo("en-us");
System.Globalization.DateTimeFormatInfo dtinfo = new System.Globalization.DateTimeFormatInfo();
dtinfo.ShortDatePattern = "dd-Mon-yyyy";
dtinfo.DateSeparator = "-";
和应用此短日期模式日期时间选择器。它的工作原理
And apply this short date pattern to date time picker.. It works
这篇关于WPF工具包,如何申请日期格式在C#中的日期选择控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文