WPF - 如何更改 XAML 并立即查看 VS2010 中的影响,而无需编译/运行?
有没有办法获得有关 WPF 应用程序中更改 XAML 的影响的即时反馈/视图?即无需重新编译/运行?在VS2010中。
我特别问这个问题,因为我正在使用 WPF Toolkit 库中的图表,并且我希望能够看到在更改各种图表样式等后我所做的 UI 中的更改,但无需重新编译/运行等(如果可能的话)
Is there a way to get an immediate feedback/view of the impact of changing XAML in a WPF application? i.e. without having to recompile/run? In VS2010.
In particular I ask this as I'm using the Charting from the WPF Toolkit library, and I'd like to be able to see the change in the UI I make after changing various charting sytles etc, but without having to recompile/run etc (if this is possible)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
VS2010 WPF 编辑器(我认为是默认情况下)在分割视图中工作,其中一半是实时“设计器视图”,另一半是 XAML 文本。一般来说,设计器部分会自行更新以遵循 XAML,而无需重新编译。
使用 VS2010,您甚至可以安排在一台显示器上显示设计器视图,在另一台显示器上显示 XAML(如果有帮助的话)。
当然有可能编写一个在 XAML 编辑期间无法正确更新自身的控件 - 也许这就是您所看到的。
当您编辑 XAML 文件时,您能看到拆分的 XAML/设计器视图吗?如果没有,分离杆是否已完全拉至顶部?
The VS2010 WPF editor works (by default, I think) in a split view, with a live 'designer view' in one half and the XAML text in the other. In general, the designer part does update itself to follow the XAML without the need to recompile.
With VS2010 you can even arrange to have the designer view on one monitor and the XAML on the other, if that helps.
It would certainly be possible to write a control which didn't update itself properly during XAML editing - perhaps that's what you're seeing.
Can you see the split XAML/designer view when you edit XAML files? If not, has the splitter bar been pulled completely to the top?
AFAIK,不在 Visual Studio 中,不。设计器中的分割视图总体上相当不错,但有时它只需要重新编译。
我们使用 XamlPad 来处理此类事情。 Expression Blend 对此也有更好的效果。
AFAIK, not in Visual Studio, no. The split view in the designer is pretty decent in general, but sometimes it just demands a recompile.
We use XamlPad for this sort of thing. Expression Blend is a lot better for this, too.