使用StaticResources的WPF Designer问题 [英] WPF Designer issue with StaticResources

查看:79
本文介绍了使用StaticResources的WPF Designer问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了这些帖子中的问题,如果我指定了另一个DLL或XAML页面中的StaticResource,设计器将无法加载页面。 第一个链接指出这已在VS2008 SP1中修复,但我正在运行SP1,它仍然会发生。 第二个链接只是关于在2009年9月仍然看到这个的人的更多信息。 

当然这几乎会杀死使用设计器的能力,因为样式通常在共享的XAML页面或DLL中。 我可以使用DynamicResource,但我不喜欢在每个页面中更改100个StaticResources的想法,并且只想使用设计器来控制DynamicResource。

https://connect.microsoft.com/VisualStudio/反馈/ ViewFeedback.aspx?FeedbackID = 353312

http://www.sherazblog.com/BlogEngine/post/2009/09/18/WPF-designer-issue-with-user-static-resource .aspx

I am experiencing the problem in these posts where the designer will not load the page if I have specified a StaticResource that is in another DLL or XAML page.  The first link states that this is fixed in VS2008 SP1 but I am running SP1 and it still occurs.  The second link is just more information about someone still seeing this in Sep 2009. 

Of course this all but kills the ability to use the designer since styles are generally in a shared XAML page or DLL.  I can use DynamicResource but I don't like the idea of changing 100's of StaticResources in every page and control to DynamicResource just to use the designer.

https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=353312

http://www.sherazblog.com/BlogEngine/post/2009/09/18/WPF-designer-issue-with-user-static-resource.aspx

推荐答案

使用Expression Blend编辑设计。您可以同时在Expression Blend和Visual Studio中打开项目,而在一个中进行的更改将反映在另一个中。这就是我们大多数人在设计部分工作的方式,以避免您遇到的问题。
Use Expression Blend to edit the design. You can open your project both in Expression Blend and Visual Studio at the same time and the changes made in one gets reflected in the other. This is how most of us work on the design part to avoid such issues as you are facing.


这篇关于使用StaticResources的WPF Designer问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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