#371 – 指定日历控件显示的日期时间(Specifying a Default Date for a Calendar Control to Display)
来源:互联网 发布:我的世界光影优化设置 编辑:程序博客网 时间:2024/04/28 18:07
当你使用日历控件Calendar 的时候,它会默认显示当前的日期。
但是你可以通过设置DisplayDate 属性,设置默认显示的日期。
<Calendar SelectionMode="SingleDate" DisplayDate="7/20/1969"/>
上面的代码默认显示1969年七月二十号。
你也可以通过DisplayDateStart 属性和DisplayDateEnd 指定日历显示一段时间,在这段时间外的将不会在日历控件中显示。
<Calendar SelectionMode="SingleDate" DisplayDateStart="12/7/1941" DisplayDateEnd="8/14/1945"/>
从图片中看到,设置了起始时间为1949年12月7日后,其前面的日期将不被显示,日历上开始的日期是1949年12月7日。而设置了结束日期为1949年8月14日后,1945年以后的将不被显示。
原文地址:https://wpf.2000things.com/2011/08/24/371-specifying-a-default-date-for-a-calendar-control-to-display/
0 0
- #371 – 指定日历控件显示的日期时间(Specifying a Default Date for a Calendar Control to Display)
- #368 –在Calendar 控件中指定不可选择日期(Specifying Blackout Dates in a Calendar Control)
- #364 – 日历控件日期多选(Allowing a User to Select Multiple Dates in a Calendar Control)
- #273 – 通过Image 控件显示图片(Display a Picture Using an Image Control)
- #256 – 使用FixedDocument 在指定的地方显示内容(Use a FixedDocument to Display Content at Fixed Locations)
- 时间日历:Date、Calendar
- 14.8.2 Specifying the Row Format for a Table 指定表的Row Format
- 14.9.2 Specifying the Row Format for a Table 指定 表的行格式
- #363 – 日历控件基础(Calendar Control Basics)
- [控件]DatePicker日期,TimePicker时间,Calendar日历,DatePickerDialog弹出的日期,TimePickerDialog弹出的时间
- JAVA的日期类DATE、日期格式化、Calendar日历类
- How to format date for display or to use in a shell script
- Java Calendar日历与Date日期的相互转换
- java 日期(Date),日历(Calendar),格式化(DateFormat)使用方法
- #266 – 指定FontSize的值(Specifying Values for FontSize)
- #370 – 通过绑定显示当前时间(Binding a Label’s Content to the Current Date and Time)
- Java--Date(日期)和Calendar(日历)类
- Calendar日历类,Date日期类
- 工厂模式
- 中国地图坐标(GCJ-02)偏移算法破解小史
- android apk 文件反编译
- 程序员的十层楼
- Android开发之ViewPager实现轮播图(轮播广告)效果的自定义View
- #371 – 指定日历控件显示的日期时间(Specifying a Default Date for a Calendar Control to Display)
- 欢迎使用CSDN-markdown编辑器
- <总结> 部署 Kubernetes+Heapster+InfluxDB+Grafana 详解
- 设置同一层级 不能同时点击两个view
- winmerge比较文件错误
- hibernate使用truncate语句报错
- linux skb_buff 解析len, data_len, head, data, tail, end
- 《老罗的Android之旅》导读PPT
- HTML主要格式标签