问题
Following on from this question, I understand that Visual Studio 2008 doesn't accurately render Designs made on Expression Blend. The additional problem I have is, the View of the Window doesn't match with the Design shown on Blend. I am using Expression Blend 2.0, and Visual Studio 2008(.NET 3.5). Could this have something to do with it?
The design is very simple, just some buttons placed next to each other. I understand without the XAML code, it would be difficult to address the exact problem, I just want to know the strategy to tackle such difference.
回答1:
In your previous question, you failed to mention you were using version 2.0 of Blend. That's a terribly old version. It's akin to wanting to write .NET 4 code and having only VS2003 installed. If you're using VS2008, you should use Blend 3; if you're using VS2010, use Blend 4. The version mismatch is probably part of your issue. I'd need to see code (both .xaml and .xaml.cs) to figure out the rest.
回答2:
My issue has been resolved. Though I am still confused as to why Blend can't render the Run time layout properly. What I found is, by putting boundary markers around each button keeps them in the same view during Run Time. Otherwise, one of the button appears to occupy much larger area than it set to. In any case, the problem at hand is too localized for someone to tackle externally.
来源:https://stackoverflow.com/questions/7118685/run-time-view-of-wpf-window-doesnt-match-the-design-view-of-expression-blend