Changes
What changed in each version of ExControls 2 and how to migrate. The package versions are on nuget.org, the documentation of an older major version is in the version picker at the top of the page.
2.2
ExLabel,ExListBox,ExRichTextBox,ExTreeView,ExPropertyGridandExColorSelectorimplementIThemeable, so all Ex* controls style themselves. Handlers that an application registered forLabel,ListBox,RichTextBox,TreeView,PropertyGridorUserControlno longer apply to them; theirApplyThemedoes what such handlers usually did (box and label colors also in the system style, a 1 px border in the theme color, dark scroll bars). The tool strip ofExPropertyGridstill uses the application's handler forToolStrip.ExListBox.SelectedRowForeColorsets the text color of the selected rows in the custom style; the system highlight text color was unreadable on a lightSelectedRowBackColor. A disabled list in the custom style usesDisabledBackColorandDisabledForeColor, which had no effect before.ExListBoxswitched back from the custom style draws its items again (it stayed owner-drawn with nothing drawing the items) and a list without a border no longer gets one in the custom style.UndoRedoActionChoosercan be used:SetCommandsfills it with the history ofUndoRedoManager, a click chooses the actions up to the one under the cursor and raisesCommandChosen,CountTextsets the text with the number of selected actions (the Slovak placeholder text is gone) and the control implementsIThemeable.ToolStripUndoRedoActionChooseropens in the size of the list instead of an empty 2 px drop-down, selects the newest action when it opens, closes after a choice and applies a theme to the list. See Undo and redo.UndoRedoManager.Undo(IUndoRedoCommand)andRedo(IUndoRedoCommand)include the given command. They stopped right before it, so choosing the newest action did nothing.DataGridViewExCheckBoxColumnappliesDefaultStyleand its colors also to the cells of the first row.ExListBoxno longer leaks a GDI region on every repaint of its border,ExRichTextBoxno longer leaks a device context on every repaint in the custom style,ExLineSeparatorno longer disposes theGraphicsof its paint event.
2.1
ExDockManagerandExDockPanel: dockable tool panels with docking guides, auto-hide, floating windows and a saved layout, see Dock manager.ExThemer.KeepDefaultskeeps the properties a theme changes and restores them for the system style, so Ex* controls switched back from the custom style look like controls that never had it.ExTools.SetBorderColordraws a 1 px border in the theme color on list boxes, checked list boxes and tree views (also inDrawToBitmap).ExButton.DisabledForeColorsets the text color of a disabled button in the custom style.ExOptionsView.SearchHighlightColorandExOptionsPanel.HighlightMatcheshighlight the options matching the search.ExFormdefaults toFormStyle.Autoand keeps the system caption color;FormStyle.Defaultmade the active caption black in dark mode.ExCheckedListBoxrepaints only the items under the mouse instead of the whole list and raisesMouseMoveandMouseLeavein the custom style too.
2.0
Breaking changes
System.Linq.Enumerableextensions were renamed toExEnumerable, theIsExternalInitpolyfill is internal.- Unused theming experiments were removed (
ExStyle,ExStyleManager,IStylable,ExApplication,ExAppThemeand others) together with the unfinishedExFormDesigner, whichExTitleBarreplaces. ExTools.SetTitlebarAndBorderColor(IntPtr, ...)no longer swaps the text and border colors. It used wrong DWM attribute numbers and theFormoverload compensated them.ExForm.DarkTitleBarandTitleBarBackColorno longer reset each other, the caption color takes precedence. Empty title bar colors restore the system colors also after the form is shown.
Migration from 1.x
- Calls of the LINQ extensions in the extension method syntax don't change. Static calls through the class name use
ExEnumerable(the class stays in theSystem.Linqnamespace), which also ends the conflict withSystem.Linq.Enumerableof the framework. - Replace the removed theming classes by
ExThemeandExThemer, see Themes. - Callers of
SetTitlebarAndBorderColor(IntPtr, ...)that swapped the colors to compensate the bug pass them in the documented order now.