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, ExPropertyGrid and ExColorSelector implement IThemeable, so all Ex* controls style themselves. Handlers that an application registered for Label, ListBox, RichTextBox, TreeView, PropertyGrid or UserControl no longer apply to them; their ApplyTheme does 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 of ExPropertyGrid still uses the application's handler for ToolStrip.
  • ExListBox.SelectedRowForeColor sets the text color of the selected rows in the custom style; the system highlight text color was unreadable on a light SelectedRowBackColor. A disabled list in the custom style uses DisabledBackColor and DisabledForeColor, which had no effect before.
  • ExListBox switched 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.
  • UndoRedoActionChooser can be used: SetCommands fills it with the history of UndoRedoManager, a click chooses the actions up to the one under the cursor and raises CommandChosen, CountText sets the text with the number of selected actions (the Slovak placeholder text is gone) and the control implements IThemeable. ToolStripUndoRedoActionChooser opens 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) and Redo(IUndoRedoCommand) include the given command. They stopped right before it, so choosing the newest action did nothing.
  • DataGridViewExCheckBoxColumn applies DefaultStyle and its colors also to the cells of the first row.
  • ExListBox no longer leaks a GDI region on every repaint of its border, ExRichTextBox no longer leaks a device context on every repaint in the custom style, ExLineSeparator no longer disposes the Graphics of its paint event.

2.1

  • ExDockManager and ExDockPanel: dockable tool panels with docking guides, auto-hide, floating windows and a saved layout, see Dock manager.
  • ExThemer.KeepDefaults keeps 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.SetBorderColor draws a 1 px border in the theme color on list boxes, checked list boxes and tree views (also in DrawToBitmap).
  • ExButton.DisabledForeColor sets the text color of a disabled button in the custom style.
  • ExOptionsView.SearchHighlightColor and ExOptionsPanel.HighlightMatches highlight the options matching the search.
  • ExForm defaults to FormStyle.Auto and keeps the system caption color; FormStyle.Default made the active caption black in dark mode.
  • ExCheckedListBox repaints only the items under the mouse instead of the whole list and raises MouseMove and MouseLeave in the custom style too.

2.0

Breaking changes

  • System.Linq.Enumerable extensions were renamed to ExEnumerable, the IsExternalInit polyfill is internal.
  • Unused theming experiments were removed (ExStyle, ExStyleManager, IStylable, ExApplication, ExAppTheme and others) together with the unfinished ExFormDesigner, which ExTitleBar replaces.
  • ExTools.SetTitlebarAndBorderColor(IntPtr, ...) no longer swaps the text and border colors. It used wrong DWM attribute numbers and the Form overload compensated them.
  • ExForm.DarkTitleBar and TitleBarBackColor no 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 the System.Linq namespace), which also ends the conflict with System.Linq.Enumerable of the framework.
  • Replace the removed theming classes by ExTheme and ExThemer, see Themes.
  • Callers of SetTitlebarAndBorderColor(IntPtr, ...) that swapped the colors to compensate the bug pass them in the documented order now.