读书人

ChildWindow如何加UserControl.Resour

发布时间: 2012-03-23 12:06:21 作者: rapoo

ChildWindow怎么加UserControl.Resources啊
xaml中加入 <UserControl.Resources>


<UserControl.Resources>
<local:TimeConverter x:Key="TimeConverter" />
</UserControl.Resources>


提示错误
The property 'Resources' does not exist on the type 'ChildWindow' in the XML namespace...

[解决办法]
ChildWindow 确定是一个 UserControl ?
[解决办法]
<basics:ChildWindow.Resources>
<local:TimeConverter x:Key="TimeConverter" />
</basics:ChildWindow.Resources>

请使用这种形式来写ChildWindow资源。它已经不是UserControl
[解决办法]
<controls:ChildWindow.Resources>
<local:TimeConverter x:Key="TimeConverter" />
</controls:ChildWindow.Resources>
[解决办法]
<controls:ChildWindow.Resources>
<local:TimeConverter x:Key="TimeConverter" />
</controls:ChildWindow.Resources>

读书人网 >CAD教程

热点推荐