windowsforms-118362-common-features-version-compatibility-default-property-values.md
DevExpress version updates introduce new features that may change control default behavior. When you migrate to a new version, you can revert these changes to the previous version using the static WindowsFormsSettings.DefaultSettingsCompatibilityMode property. This option should be set at application startup.
namespace WindowsFormsApp1 {
static class Program {
[STAThread]
static void Main() {
DevExpress.XtraEditors.WindowsFormsSettings.DefaultSettingsCompatibilityMode =
DevExpress.XtraEditors.SettingsCompatibilityMode.v23_1;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1());
}
}
}
Public Class Form1
Shared Sub Main()
DevExpress.XtraEditors.WindowsFormsSettings.DefaultSettingsCompatibilityMode = DevExpress.XtraEditors.SettingsCompatibilityMode.v16
Application.EnableVisualStyles()
Application.SetCompatibleTextRenderingDefault(False)
Application.Run(New Form1)
End Sub
End Class
All recent changes are in effect if the WindowsFormsSettings.DefaultSettingsCompatibilityMode property is set to Latest.
Affected ControlsBaseListBoxControl (and all descendants)What ChangedBaseListBoxControl descendants had their UseTextForAccessibility styles enabled. The second parameter for methods that enabled this style is now false :
// Previous version
editor.SetStyle(ControlStyles.UseTextForAccessibility, true);
// The latest version
editor.SetStyle(ControlStyles.UseTextForAccessibility, false);
Note
It is not recommended to revert to the previous behavior and set the Active Accessibility name for affected editors manually. If you cannot follow this recommendation, set the DefaultSettingsCompatibilityMode property to “v23_1” or enable the static WindowsFormsSettings.UseEditorTextAsAccessibleName property.
Refer to the following advisory for additional information: The UseTextForAccessibility control style is now disabled.
BaseEdit.AdvancedAutoWidthInLayoutControl property.DisableTextEditor/HideTextEditor.DisableTextEditor/HideTextEditor.The table below illustrates the properties and behavior that change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v20_2 (in comparison to the Latest mode).
Affected controls: Controls that display filter criteria (Data Grid, Tree List, Vertical Grid, Pivot Grid, and Filter Control).
Related property: WindowsFormsSettings.FilterCriteriaDisplayStyle
“v20_2” Behavior: Default display style of filter criteria is Text.
“Latest” Behavior: Default display style of filter criteria is Visual.
Affected controls: Controls that display filter criteria (Data Grid, Tree List, Vertical Grid, and Filter Control)
“v20_2” Behavior: If the filter criteria contains custom expressions that cannot be converted to Filter Editor nodes, the control’s Edit Filter button is hidden, and the Filter Editor, if invoked from code, does not display these expressions.
“Latest” Behavior: If the filter criteria contains valid custom expressions that cannot be converted to Filter Editor nodes, the following takes place:
Set the FilterEditorAllowCustomExpressions property to True to allow a user to add custom expressions (the Filter Control’s context menu contains the Add Custom Expression command), and edit existing custom expressions (click the custom expression text to open the Expression Editor). See also: ColumnViewOptionsFilter.FilterEditorAllowCustomExpressions, TreeListOptionsFilter.FilterEditorAllowCustomExpressions, VGridOptionsFilter.FilterEditorAllowCustomExpressions, FilterControl.AllowCustomExpressions.
The table below illustrates the properties and behaviors that change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v19_2 (in comparison to the Latest mode).
The table below illustrates the properties and behaviors that change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v19_1 (in comparison to the Latest mode).
ImageOptions.ImageUri properties.Set the GridViewOptionsFind.FindPanelLocation property to
Panelto revert to two separate elements.
Affected control: Text editors (TextEdit control and descendants )
Related property: The Null Value Prompt (RepositoryItemTextEdit.NullValuePrompt).
“v19_1” Behavior: To display the Null Value Prompt when an editor’s value is empty (for example, it is set to an empty string) and when the editor is focused, you need to manually enable the following properties:
“Latest” Behavior: The Null Value Prompt (RepositoryItemTextEdit.NullValuePrompt) is displayed when an editor’s value is empty or null (the default setting). This affects non-focused, focused and read-only editors. You can specify when to show the Null Value Prompt with the ShowNullValuePrompt property. RepositoryItemTextEdit.NullValuePromptShowForEmptyValue and RepositoryItemTextEdit.ShowNullValuePromptWhenFocused properties are hidden, as they are replaced by the ShowNullValuePrompt property.
You can use the TreeListOptionsMenu.ShowExpandCollapseItems property to hide these commands for individual Tree List controls.
The table below illustrates the properties and behaviors that change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v18_2 (in comparison to the Latest mode).
Affected controls: FilterControl, DevExpress.XtraFilterEditor.FilterEditorControl
Related properties and features: display custom functions (registered with the CriteriaOperator.RegisterCustomFunction or CriteriaOperator.RegisterCustomFunctions method) as nodes in a filter control’s visual tree, when underlying criteria contain these functions.
“v18_2” Behavior: a filter control’s visual tree does not display nodes for the registered custom functions.
“Latest” Behavior: a filter control’s visual tree displays nodes for the registered custom functions.
Affected controls: FilterControl, DevExpress.XtraFilterEditor.FilterEditorControl
Related property: FilterControl.ShowDateTimeFunctions
“v18_2” Behavior: DateTime functions are hidden.
“Latest” Behavior: DateTime functions are available.
The table below illustrates the properties and behaviors that change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v18_1 (in comparison to the Latest mode).
- images in ImageComboBoxEdit and CheckEdit
- context images in TextEdit descendants
- conditional formatting images in in-place editors.
Appearance.BackColor and Appearance.BorderColor settings over skins.The table below illustrates the properties that may change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v17_2 (in comparison to the Latest mode).
DevExpress.XtraRichEdit library).DevExpress.DataAccess.UI library), which supports syntax highlighting and autocomplete in the filter editor’s Text panel.
- BarManager
- DockManager panels
- Ribbon UI (RibbonControl and BackstageViewControl)
- DocumentManager
- XtraTabbedMdiManager
The table below illustrates which properties may change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v17_1 (compared to the Latest mode).
Width property value.MinWidth property values change dynamically when TreeListOptionsView.BestFitNodes is set to Visible.MinWidth property has a constant value that depends only on the maximum available node indent.The table below illustrates the properties and behaviors that change if you set the WindowsFormsSettings.DefaultSettingsCompatibilityMode property to v16 (in comparison to the Latest mode).
The same limitations apply to developers. If you switch the OptionsFilter.AutoFilterCondition option to BeginsWith for a numeric column, it has no effect unless you change this column’s filtering mode to DisplayText.
Default style applies the RibbonControlStyle.Office2007 style.Default style applies the RibbonControlStyle.Office2013 style.