Some Experiences Using WPF Designer on Visual Studio 2010 BETA 2
In general, I notice great improvements in terms of performance and stability in VS2010 B2. Thanks to Rico Mariani and team for this, and of course for the WPF team as well! The WPF team has done a great job of fixing the text blurriness for BETA 2.
Specific to WPF Designer, I also notice great improvements. It's noticeably faster (compared to VS2008 SP1) and has some great new features. Thanks to Mark Wilson-Thomas and team for this!
Some improvements I notice:
- Faster loading of the designer. Though it's still a bit slow for the first time loading, but the subsequent loading is fast. (I still wonder why it's almost instant in Blend... Someone give me a hint?)
- Nice exception detail in the designer (instead of showing a blank designer with useless message!). I've requested this before since it really helps debugging the problem with the XAML and code behind. It's great to see this in VS (it exists in Blend).
- The Property Browser also has improved discoverability and readability. It shows common category properties and hide others. The advanced properties is also great, like one in Blend.
- The Toolbox shows user control defined in the projects across the solution.
And well of course, there're some issues with it as well:
- The designer ignores (dependency) property value change in the control's static constructor. For example, when I define the height and width property in static constructor, it has no effect in the designer. It works well in VS2008SP1.
public partial class MainWindow : Window { private static Type _typeOfThis; static MainWindow() { _typeOfThis = typeof(MainWindow); HeightProperty.OverrideMetadata(_typeOfThis, new FrameworkPropertyMetadata(480.0D)); WidthProperty.OverrideMetadata(_typeOfThis, new FrameworkPropertyMetadata(640.0D)); } public MainWindow() { InitializeComponent(); } }<Window x:Class="WpfApplication.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="MainWindow" WindowStartupLocation="CenterScreen" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:my="clr-namespace:WpfApplication"> <Grid> </Grid> </Window>
Note that I've removed the width and height in XAML and move it to static constructor. - Sometimes, the property browser becomes blank temporarily when building project. I notice this in my project as well as in your latest video in Channel 9. Though I think this should be minor.
I think that's all for now, more feedback later on. I hope the quality is getting better in the future release. Thanks again!
Maximilian Haru Raditya
All Replies
- Thanks for your feedback Maximilian, and for taking time to evaluate Visual Studio 2010 Beta 2's WPF and Silverlight Designer.
I'm glad that the improvements we have made are hitting the mark for you.
On initial performance, have you had chance to make the registry change I mentioned in my posting to improve initial performance? This late-breaking change will be part of the default setup for Visual Studio in future releases, but for now you have to make the registry change to see the improvement. We are continuing to focus on performance as we move towards release, and it would be useful to know if that change makes the difference for you.
We are looking into the issues you mention; I'll reply to this thread when I have more to say on that.
We look forward to your continuing feedback to help us improve the final product; please do continue to raise issues. Whilst we're happy to keep an eye on this forum and take bugs here, if you hit bugs in the Beta, it is very useful to have these raised via the Connect system (see this post on how to raise bugs on the designer via Connect) as this allows both you and us to keep track of the issue through to resolution.
Thanks again,
Mark
Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is' About the start-up improvement of the designer, I've read it. Though, I'm not sure where to create the key.
I'm using Windows 7 x64 (64 bit). Should I create it in the registry key you mentioned or in Wow6432Node key?About the bug, I'm going to report in Connect.
Thanks!
Maximilian Haru Raditya- Hi Maximilian
Thanks for pointing out the missing detail in this set of instructions. I've just updated the post to include information for 64-bit users.
Your assumption was correct, the Wow6432Node is the correct location for a 64-bit user:
1. Close any open VS instances
2. Open RegEdit (as an administrator as needed)
3. Select:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\10.0 key (if you are running a 32 bit OS)
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\VisualStudio\10.0 key (if you are running a 64 bit OS)
4. Right click and add key, type ClrHost
5. In the newly created key, right click and add a DWORD32 with the name StartupFlags
6. Set its value to 5
7. Close RegEdit
8. Start up Visual Studio and use as normal
Thanks for your input!
Mark
Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is' - Following up, Maximilian, have you had a chance to try the Registry Key mentioned above? As mentioned in my post this is for regular Cider users only and might cause some instability elsewhere, but you can reverse it by removing the key. I would like to understand whether it fixes cold/first-time loading for your case.
Thanks
Mark
Mark Wilson-Thomas - Program Team - WPF & SL Designer for Visual Studio - posts are provided 'as-is' Yes, Mark, I have tried the suggestion made and I think it works as intended in term of performance. It comes out with the following results on my laptop:
- The first-time loading time WITHOUT the fix: 10 seconds (on average).
- The first-time loading time WITH the fix: 3 seconds (on average).
In addition, I notice another problem that there's a delay when switching between the designer and text editor, for the first time also. Though I think this should be a separated issue.About stability, so far it never crashes. But I'm not sure I can justify it based on my limited usage of VS2010B2.
Maximilian Haru Raditya


