The XAML editor in Visual Studio 2008 is much improved over the 2005 Extensions version. Let’s take a look as some of the preferences you can change in the Tools/Options dialog.
Full XAML view
I like working in the XAML editor in Visual Studio. Most of time if I want a WSYWIG editor I’ll use Expression Blend. I’ll have to see if I like Visual Studios WPF Designer better now that it has shipped. I do know that the XAML editor in VS is considerably better than the Blend editor. That means I tend to write most of my XAML in VS.
I’m happy to see the new “Always open documents in full XAML view” option. Check this option and your WPF windows (including new files) always open in XAML view. Glorious!
Auto Insert
The other two checkboxes on the XAML/Miscellaneous screen are fairly self explanatory.
Closing Tags: When you finish typing the opening XAML element VS will automatically add the closing element. Just like the VS XML editor. Frankly, I can’t conceive turning off this setting as it saves so much typing.
Attribute Quotes: Automatically insert two quotes “” and place the cursor between the begin and end quote. Visual Studio has a some quirky behavior here though depending on whether you use TAB or = to complete your attribute value.
When you type the complete attribute (example, Background) and then type the = character VS examines your preference and auto inserts the quotes. This only happens if you type the complete word and then =.
When you type a few letters of the attribute (example, bac) , see the Intellisense drop-down showing your desired attribute name, and you press TAB Visual Studio ignores your preference and inserts everything (example Background=””).
I usually use TAB or the CodeRush shortcuts to enter my values as it is much faster than typing the whole attribute name. For this setting I leave it checked.
To follow along with this example you need to have the final version (RTM) of Visual Studio 2008 installed. Find trial versions here.
-Walt Ritscher
[…] part one I discussed the Tools/Options/Text Editor/XAML/Miscellaneous section. In part two I look at the XAML Formatting […]
Hi,
I am using Visual Studio 2008 Beta 2. I am not able to see the “Miscellaneous” option in my XAML options.
Please suggest.
Jigar.
That’s because you have to have the RTM version installed. This won’t work with Betas or CTPs. Download from MSDN or see the link in the article for the Express editions.
Hi there!
I have a huge Problem. In my VS2008 Beta 2 I don’t have any XAML support. I dont see split screen or design view and when I’m trying to configure the options via Tool -> Options -> Text Editor -> XAML I only see: General, Tabs and Formatting. But when I click “Formatting” only a message is displayed: An error occurred loading this property page.
I unistalled and reinstalled everything related to the VS but still no change.
Any clue?
Thanks in advance, Stefan
Stefan
I’m not sure what the problem is. Can you get a copy of the VS 2008 release version? (see link in article)
I downloaded hte 90 days trial of the VS2008 now … and still no XAML support (no Intellisense, no color highlighting, no split screen, no design view) just plain text. I tried to uninstall the VS2008 Beta as described here: http://www.microsoft.com/express/support/uninstall/default.aspx
Then I installed the trial version. The only change I found is that I now have the “Miscellaneous” section. But even there I only get a message on the property page: “An error occurred loading this property page.”
I’m pretty frustrated.
Greets, Stefan
You can find a screenshot to this problem here:
very interesting, but I don’t agree with you
Idetrorce
hi sir,
I have a Problem in my VS2008 express edition I don’t have any XAML support. I am not able to see the “Miscellaneous” option in my XAML options.I only get a message on the property page: “An error occurred loading this property page.” i hav reinstalled vs2008 and found still problem persists plz help me out sir.
thanking u sir
I installed the VS Express editon and no editor for XAML is installed. I reinstall and nothing happens. It is more than frustating and consumes a lot of time…
I found a way to still take advantage of intellisense on attributes yet not auto insert beginning and ending double quotes:
When the attribute is selected in the intellisence dropdown, type ” (double quote) instead of hitting tab. The attribute name will still auto complete and you won’t have beginning and ending double quotes.
Although the XAML Designer works on WPF windows, it doesn’t seem to work on Page.xaml type of xaml; any idea how to get this to work in VS 2008? I have the latest support for Silverlight 2 and still no go on my end..
I have the same problem
No Intellisense
– and –
If I click on Tools->Options->Text Editor->XAML->Formatting I get the message “an error occurred loading this property page”
I went through the installs on my work PC this afternoon without any problem. Intellisense and formatting worked great. I did the same process at home.
I followed these steps to install:
http://silverlight.net/GetStarted/default.aspx):
I even uninstalled everything but VS2008 and had the same results.
I too have no XAML tools in the toolbox or ability to change the format options in the evaluation version. I have been working in VS2008 Express and seemed to have all I needed, although admittedly I didn’t try any Silverlight development there.
Am running thru Scott Gu’s tutorials, and although I’m happy to enter code manually, it doesn’t give me great confidence in forking out for the full version of VS2008. I’m big fan af this development environment in terms of productivity and what I can offer my customers, but am getting very frustrated at having to waste a lot of time searching the web for solutions to problems that shouldn’t be here in any software, let alone an evaluation version. Will have to start seriously checking out other web development options, eg open source 😦
C’mon Microsoft, just give us a product that works as these tutorials show, please.
the solution elsewhere:
http://forums.msdn.microsoft.com/en-US/vswpfdesigner/thread/053dc5c3-27fe-4ea2-a7f5-5c6cf35000bb/
Opening the Start->Run command and entering “devenv /resetskippkgs” was all it took!
This worked for me. Thank you.
I am having a similar issue and have tried the suggested fixes but nothing helps. I have VS 2008 Professional. The About dialog shows Version 9.0.30729.1 SP. That’s right it doesn’t say SP1, just SP. It also lists .Net Framework 3.5 SP1.
I executed devenv with this switch /Log c:\temp\vs2008 and found these error messages;
74
2009/03/01 00:06:46.116
Error
Microsoft Visual Studio
SetSite failed for package [Microsoft.VisualStudio.Xaml]
{E58C2A8B-BCC4-4559-AD59-D62EB6D58A22}
80070057 – E_INVALIDARG
Value does not fall within the expected range.
75
2009/03/01 00:06:46.117
Error
Microsoft Visual Studio
End package load [Microsoft.VisualStudio.Xaml]
{E58C2A8B-BCC4-4559-AD59-D62EB6D58A22}
80070057 – E_INVALIDARG
Value does not fall within the expected range.
I also tried repairing VS2008 via Add/Remove Programs but no difference. I also opened Explorer and right clicked a .xaml file and went to Open with but the only thing listed is Windows Presentation Foundation Host. The GUID in the error msgs above matches the GUID in the pop-up message I get if I try to open the XAML Editor Formatting section in Tools->Options->Editor.
Any help is appreciated as this is driving me crazy.
2 things…
1. Do the devenv /resetskippkgs thing if you are getting the “An error occurred loading this property page.” problem.
2. Right Click on the XAML file in VS Solution Explorer, choose Open With… and choose Source Code (Text) Editor ( & set it as default) … otherwise it will try and use the XML Editor which has no intellisense.
I tried those things but it didn’t help. What did help was installing VS2008 SP1.
devenv /resetskippkgs worked.