代码背后的Datepicker日历样式 [英] Datepicker calender style in code behind

查看:78
本文介绍了代码背后的Datepicker日历样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Team,


我想在代码背后设置我的Datepicker日历。实际上我想要的字体大小为  PART_HeaderButton。
指导我如何实现这个目标?


示例


DatePicker dp = new DatePicker() ;

                            dp.Name = parameter.Name;

                            dp.SelectedDateFormat = DatePickerFormat.Short;

                            dp.CalendarStyle =?


谢谢,


黄金


解决方案

看一下这个帖子的答案:


https://social.msdn.microsoft.com/Forums/ vstudio / zh-CN / 34d70e7f-dffd-4368-8f8d-59352a290f60 / wpf-datepicker-month-name-issue?forum = wpf


我认为你必须更换整个模板但是粗体部分是需要仔细研究的部分。


它正在做一些稍微不同的事情,但只是找到你需要改变的行可能是最难的部分。


Hi Team,

I want to style my Datepicker calender in code behind. Actually I want to chane the font size of PART_HeaderButton. Please guide me how to achive this?

example

DatePicker dp = new DatePicker();
                            dp.Name = parameter.Name;
                            dp.SelectedDateFormat = DatePickerFormat.Short;
                            dp.CalendarStyle = ?

Thanks,

Golden

解决方案

Take a look at the answer to this thread:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/34d70e7f-dffd-4368-8f8d-59352a290f60/wpf-datepicker-month-name-issue?forum=wpf

I think you have to replace the entire template but the parts in bold are the things to take a good look at.

It's doing something slightly different but just finding the lines you need to change is probably the hardest part of this.


这篇关于代码背后的Datepicker日历样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆