Converting to v24.1
All of the breaking changes are detailed or linked below.
SyntaxEditor Native Dark Theme Support
Support for dark themes is now integrated directly into SyntaxEditor. Refer to the Dark Themes topic for details on concepts like SyntaxEditorThemeManager or IHighlightingStyleColorPalette.
Switching Themes
Previously, switching between light and dark themes would require multiple steps like:
- Unregistering all classification types in a registry.
- Re-registering all the classification types from multiple providers.
- Re-loading language definition .langdef files.
- For dark theme, importing a .vssettings file with colors configured for a dark theme.
- Changing the CommonImageSourceProvider.DefaultImageSet between light and dark color sets.
A new SyntaxEditorThemeManager class now takes care of all of those settings by default, and most developers will not have to do anything to support changing themes. Check for any custom code that handles theme changes and remove any SyntaxEditor logic related to the previous technique of switching themes.
If custom registries are used instead of AmbientHighlightingStyleRegistry, those registries can be configured to automatically switch themes by calling SyntaxEditorThemeManager.Manage and passing the custom registry.
If any developer does not want the default functionality provided by SyntaxEditorThemeManager, the following code will disable the default features:
// Disable automatically switching between light/dark color palettes
SyntaxEditorThemeManager.Unmanage(AmbientHighlightingStyleRegistry.Instance);
// Ensure the light color palette is the default (in case a dark theme was active before being unmanaged)
AmbientHighlightingStyleRegistry.Instance.CurrentColorPalette = AmbientHighlightingStyleRegistry.Instance.LightColorPalette;
// Disable changing image sets
SyntaxEditorThemeManager.IsCommonImageSetSynchronizationEnabled = false;
Dark Colors
If a custom .vssettings file was used with preferred dark colors, those colors may not match the new defaults. A special dark color palette can be initialized with preferred colors to use in dark themes on a per-registry basis. The following example code demonstrates how to configure the default dark colors for the ambient registry:
IHighlightingStyleRegistry registry = AmbientHighlightingStyleRegistry.Instance;
registry.DarkColorPalette.SetForeground("String", Color.FromArgb(255, 214, 157, 133));
registry.DarkColorPalette.SetForeground("PlainText", Color.FromArgb(255, 220, 220, 220));
registry.DarkColorPalette.SetBackground("PlainText", Color.FromArgb(255, 30, 30, 30));
Note
Configuring the dark color palette is only necessary if languages are not updated with explicit dark styles.
Language Updates
The Language Designer Tool has been updated to support the configuration and preview of dark styles for classification types. Developers are encouraged to use the tool to configure appropriate dark colors instead of explicitly populating the dark color palette, and many dark colors will be automatically configured based on built-in classification types and a pre-defined mapping of common light colors to dark colors.
All Actipro-provided languages have been updated with the new dark style configuration.
New IHighlightingStyleRegistry Interface Properties
The IHighlightingStyleRegistry interface added the CurrentColorPalette, DarkColorPalette, and LightColorPalette properties. Any custom classes that implement this interface without deriving from HighlightingStyleRegistry will need to implement the new properties.
SyntaxEditor Enhancements
The following changes were made to enhance the capabilities of SyntaxEditor and might impact some applications.
- The default colors for several IClassificationType instances on DisplayItemClassificationTypeProvider have been changed to be more consistent with modern code editor expectations. Some classification types were updated to remove opacity from the default color and, instead, always apply an opacity when the color is rendered.
- SelectedText background from #99CCFF to #0078D7.
- InactiveSelectedText background from #CCDDEE to #BFCDDB.
- LineNumbers foreground from #2B91AF to #7A7A7A.
- BreakpointEnabled background from #AB616B to #963A46.
- BreakpointDisabled border from #AB616B to #000000.
- IndicatorMargin background from #F0F0F0 to #E6E7E8.
- CurrentLine border from #30A0A0A0 to #EAEAF2; 30% opacity automatically applied when rendered.
- DelimiterMatching background from #30A0A0A0 to #DBE0CC with 75% opacity automatically applied when rendered.
- FindMatchHighlight background from #C8F4A721 to #F4A721 with 75% opacity automatically applied when rendered.
- CollapsibleRegion foreground from #80D7DDE8 to #D7DDE8 with 50% opacity automatically applied when rendered. Background from #80EDEFF5 to #F6F7FA.
- ColumnGuides background from #F0F0F0 to #D0D0D0.
- IndentationGuides background from #F0F0F0 to #D0D0D0.
- The Punctuation classification type was added to all appropriate Actipro languages.
- Implement the IDotNetClassificationTypeProvider.Punctuation property for classes that implement the interface without deriving from the DotNetClassificationTypeProvider class.
- Implement the IJavaScriptClassificationTypeProvider.Punctuation property for classes that implement the interface without deriving from the JavaScriptClassificationTypeProvider class.
- Implement the IPythonClassificationTypeProvider.Punctuation property for classes that implement the interface without deriving from the PythonClassificationTypeProvider class.
- The SyntaxEditor
ForeColorandBackColorproperties are no longer used as the default foreground and background colors for a printer view. If non-default colors are desired, register a style with the PlainText classification type on the editor's highlighting style registry.
Theme Updates
Several changes were made to theme-related classes. Generally speaking, the following changes were made:
- A new "Visual Studio Blue" theme is available based on Visual Studio 2022's Blue theme.
- "Visual Studio 2005" is now referred to as "Visual Studio Classic".
- "Office 2007" and "Office 2003" are now referred to as "Office Classic".
- "Windows XP" is now referred to as "Luna".
- The "Visual Studio 2005 Beta 2" renderers have been deprecated and will be removed in a future release.
- The
WindowsXPRoyalecolor scheme has been deprecated since it duplicates other classic color schemes and will be removed in a future release. - Several previously deprecated renderers were removed.
Important
Every effort was made to ensure a seamless upgrade by maintaining binary compatibility with the previous release. After upgrading to this release, your IDE should display warnings for the use of any deprecated values. This should allow developers to slowly migrate to the new values, but do not ignore the warnings as the values will be removed in a future release.
See below for the specific details on theme-related changes.
Color Scheme Changes
The following changes were made to color schemes:
- WindowsColorSchemeType.
VisualStudio2005and WindowsColorScheme.VisualStudio2005will be referred to asVisualStudioClassicgoing forward. The originalVisualStudio2005values have been deprecated and will be removed in a future release. UseVisualStudioClassicinstead. - WindowsColorSchemeType.
Office2007Blueand WindowsColorScheme.Office2007Bluewill be referred to asOfficeClassicBluegoing forward. The originalOffice2007Bluevalues have been deprecated and will be removed in a future release. UseOfficeClassicBlueinstead. - WindowsColorSchemeType.
Office2007Blackand WindowsColorScheme.Office2007Blackwill be referred to asOfficeClassicBlackgoing forward. The originalOffice2007Blackvalues have been deprecated and will be removed in a future release. UseOfficeClassicBlackinstead. - WindowsColorSchemeType.
Office2007Silverand WindowsColorScheme.Office2007Silverwill be referred to asOfficeClassicSilvergoing forward. The originalOffice2007Silvervalues have been deprecated and will be removed in a future release. UseOfficeClassicSilverinstead. - WindowsColorSchemeType.
WindowsXPBlueand WindowsColorScheme.WindowsXPBluewill be referred to asLunaBluegoing forward. The originalWindowsXPBluevalues have been deprecated and will be removed in a future release. UseLunaBlueinstead. - WindowsColorSchemeType.
WindowsXPOliveGreenand WindowsColorScheme.WindowsXPOliveGreenwill be referred to asLunaOliveGreengoing forward. The originalWindowsXPOliveGreenvalues have been deprecated and will be removed in a future release. UseLunaOliveGreeninstead. - WindowsColorSchemeType.
WindowsXPSilverand WindowsColorScheme.WindowsSilverwill be referred to asLunaSilvergoing forward. The originalWindowsXPSilvervalues have been deprecated and will be removed in a future release. UseLunaSilverinstead. - WindowsColorSchemeType.
WindowsXPRoyaleand WindowsColorScheme.WindowsXPRoyalehave been deprecated since they duplicate other classic color schemes and will be removed in a future release. Use one of the other classic color schemes instead, likeVisualStudioClassic.
UIRenderer Changes
The following renderers are being renamed. In each scenario, the original renderer was recreated to derive from the class of the new name and has been marked as deprecated for removal in a future release. Migrate to the new renderer names to avoid future breaking changes.
WindowsXPScrollBarRendererwill be referred to asWindowsScrollBarRendergoing forward.Office2003NavigationBarRendererwill be referred to asOfficeLunaNavigationBarRenderergoing forward.Office2007NavigationBarRendererwill be referred to asOfficeClassicNavigationBarRenderergoing forward.VisualStudio2002BarRendererwill be referred to asWindowsClassicBarRenderergoing forward.Office2003BarRendererwill be referred to asOfficeClassicBarRenderergoing forward.VisualStudio2002StatusBarRendererwill be referred to asWindowsClassicStatusBarRenderergoing forward.VisualStudio2005StatusBarRendererwill be referred to asVisualStudioClassicStatusBarRenderergoing forward.Office2003StatusBarRendererwill be referred to asOfficeClassicStatusBarRenderergoing forward.VisualStudio2002DockRendererwill be referred to asWindowsClassicDockRenderergoing forward.VisualStudio2002DocumentWindowTabStripRendererwill be referred to asWindowsClassicDocumentWindowTabStripRenderergoing forward.VisualStudio2002ToolWindowTabStripRendererwill be referred to asWindowsClassicToolWindowTabStripRenderergoing forward.VisualStudio2005DockRendererwill be referred to asVisualStudioClassicDockRenderergoing forward.VisualStudio2005DocumentWindowTabStripRendererwill be referred to asVisualStudioClassicDocumentWindowTabStripRenderergoing forward.VisualStudio2005ToolWindowTabStripRendererwill be referred to asVisualStudioClassicToolWindowTabStripRenderergoing forward.Office2003DockRendererwill be referred to asOfficeClassicDockRenderergoing forward.Office2003DocumentWindowTabStripRendererwill be referred to asOfficeClassicDocumentWindowTabStripRenderergoing forward.Office2003ToolWindowTabStripRendererwill be referred to asOfficeClassicToolWindowTabStripRenderergoing forward.
The following renders have been deprecated and will be removed in a future release. Migrate to different renderers to avoid future breaking changes.
Office2003VisualStudio2005Beta2DockRendererOffice2003VisualStudio2005Beta2ToolWindowTabStripRendererVisualStudio2005Beta2DockRendererVisualStudio2005Beta2ToolWindowTabStripRenderer
The following renderers were previously deprecated and removed in this release:
- Removed
MetroLightBarRenderer. Use MetroBarRenderer instead. - Removed
MetroLightDockRenderer. Use MetroDockRenderer instead. - Removed
MetroLightDocumentWindowTabStripRenderer. Use MetroDocumentWindowTabStripRenderer instead. - Removed
MetroLightToolWindowTabStripRenderer. Use MetroToolWindowTabStripRenderer instead. - Removed
MetroLightNavigationBarRenderer. Use MetroNavigationBarRenderer instead.
UIColor Updates
The UIColor class has been updated with additional support, and some existing properties/methods are being deprecated to keep the public consistent and avoid ambiguity. The original properties/methods will be removed in a future release.
Hueproperty replaced by HlsHue.- Note that the original
Hueproperty is based on values from0to1, and the new HlsHue property is based on values from0to360, so conversion will be necessary.
- Note that the original
Saturationproperty replaced by HlsSaturation.Brightnessproperty replaced by HlsLightness.- FromArgb method overload with
System.Drawing.Colorargument replaced by FromColor. - FromArgb method overload without alpha argument replaced by FromRgb.
- FromAhsb method overload without alpha argument replaced by FromHsb.
Previously Deprecated Items Removed
The following members were deprecated in previous releases and have been removed in this release.
- (Docking)
AssemblyInfo.GetImagemethod that did not accept a scale factor was removed. Use theGetImagemethod that accepts a scale factor instead. - (SyntaxEditor) IntelliPromptSessionTypes.
CodeSnippetwas removed. Use the CodeSnippetTemplate property instead.