开发者

Expression Blend Error - Value cannot be null. Parameter name: stream

开发者 https://www.devze.com 2023-01-11 22:02 出处:网络
I\'m getting the above error when trying to load a User Control xaml file in design view in Expression Blend 4.The xaml itself runs successfully in VS 2010, and I can view the xaml in blend, but not i

I'm getting the above error when trying to load a User Control xaml file in design view in Expression Blend 4. The xaml itself runs successfully in VS 2010, and I can view the xaml in blend, but not in design view. When viewing the xaml in 'xaml view' the UserControl element is underlined in red. A开发者_JS百科nybody run across this issue?


You have to remember that in order to render a control the designer will have to execute some of its code. If the code it runs does things (like make WCF calls) that the design context doesn't support then you can have problems.

For this reason the Silverlight API contains the DesignerProperties class in the System.ComponentModel namespace. Use its static IsInDesignTool property to skip/mock code that runs during control loading that can't be supported in a designer.

0

精彩评论

暂无评论...
验证码 换一张
取 消