I have updated an article that I wrote back in 2005:
HOWTO: Getting properties from the DTE.Properties collection of Visual Studio .NET.
http://www.mztools.com/articles/2005/MZ2005008.aspx
And the reason is that I have found lately that guessing the names of properties to index DTE.Properties(category, page) is not as easy as reading the MSDN documentation (whose list may not be up-to-date) or using regedit.exe to inspect the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\<version>\AutomationProperties registry entry. Specifically I have found that:
– There is no way through automation (EnvDTE) to get the C# formatting options that were introduced by VS 2005.
– Text Editor XAML settings are not exposed through DTE.Properties in VS 2008 but they are in VS 2010 (something that the MSDN docs don’t reflect yet and I doubt they will)
– Text Editor XOML settings are not exposed through DTE.Properties even in VS 2010.
I guess that some SDK service can get that information, or maybe it is something not exposed by the owner package of those settings. So I am using the other way, which is to read directly the actual property values from the HKEY_CURRENT_USER hive. But it is also tricky, because the term “TextEditor” can become “Text Editor”, “PlainText” can become “Plain Text” and the C# formatting settings seem to be updated only when VS closes and not when the Options dialog is closed (and they seem to appear only if they differ from the defaults)…