Does Expression Blend and Visual Studio Render WPF Controls Differently

别来无恙 提交于 2019-12-01 06:19:54

This is most definitely a known issue. Visual Studio uses what's known as the Cider designer to render WPF code. It most definitely renders XAML differently from Blend. Cider in VS2008 is pretty terrible, but gets much better in 2010 (but is still pretty terrible compared to Blend). One of the main differences between Cider and Blend is that Cider will read the code behind file (*.xaml.cs) while Blend will completely ignore it. Another notable difference is that Cider doesn't really understand things like Visual States and Blend SDK Behaviors (especially when you mix the two) while Blend completely understands them.

If you're constructing your view classes where you set your DataContext in XAML and then provide design time data (using Blend or a view model locator), you'll find that there are very few differences between Blend and how something actually looks at runtime.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!