动态更改syles时DatePicker崩溃 [英] DatePicker crash when changed syles dynamically

查看:103
本文介绍了动态更改syles时DatePicker崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我将自定义DatePicker的样式更改为默认值时,我都有自定义日历样式和自定义DatePicker。

I have a custom calendar style and custom DatePicker.

DatePicker并选择日期,WPF应用程序崩溃。

whenever i change the style of custom DatePicker to default DatePicker and select the date , WPF application is crashing.

谢谢,

Madhusudhan SM

Madhusudhan SM

Madhusudhan SM

Madhusudhan SM

推荐答案

问题出在自定义日期选择代码或自定义日期选择标记中,或两者兼而有之。

The problem will be in your custom datepicker code or your custom datepicker markup or both.

不可能从你给出的细节中得到更具体的信息。

Impossible to be more specific from what little detail you have given.

最容易搞砸的是模板。

从根本上改变模板和样式是非常高的风险。

Changing templates and styles fundamentally is quite high risk.

你最好的方法是从原始工作模板开始,然后改变一小块,检查它是否有效,改变一个小块,检查它是否有效....等等。

Your best approach is to start with the original working template and then change a small piece, check it works, change a small piece, check it works.... and so on.

当它崩溃并烧伤然后你知道你刚改变的那一点就破坏了它。

When it crashes and burns then you know the little bit you just changed broke it.

如果您改为立即更改负载,那么它就是十,很难弄清楚出了什么问题。

If you instead change loads at once then it's often very difficult to work out what is wrong.


这篇关于动态更改syles时DatePicker崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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