WPF Tips & Tricks (November 2022)
Interesting Support Tickets
WPF Data Grid
- Rounded Corners for GridControl using the Win11 Theme (T1109092)
- Hide Certain Filter Rules from the Excel-style Filter (T1113802)
Always Display Editor Buttons for GridControl Cells (T1114255)
Enable the EditorButtonShowMode option within the Data Grid’s View.-
Prevent Selection Based on Row Values (T1112227)
Use the CanSelectRow and CanUnselectRow events accordingly.Help Topic: Selection Availability.
-
Apply a Column Filter When a User Clicks a Button or Closes the Filter Popup (T1119268)
Set the ImmediateUpdateColumnFilter property to
false
.
WPF Data Editors
- TextEdit - Specify the Symbol Shown when the Value is Zero (T1068346)
- Hide a Badge Based on Parent Control Properties (T1110254)
- Display an Image in the PasswordBoxEdit (T1108671)
ComboBoxEdit - Enable Text Trimming in Tokens (T1109912)
Use the TokenTextTrimming and TokenMaxWidth properties to enable trimming and specify maximum token width.
WPF Bars and Ribbon
Ribbon - Change the Application Button’s Default Caption (T1115090)
Specify the ApplicationButtonText property.- BarEditItem - Define a Shortcut Key for the Editor (T1119177)
- BarEditItem - Retain Focus once the Mouse is no Longer in a BarEditItem Region (T1115386)
- Bars - Programmatically Invoke a BarItem’s ToolTip in Touch Mode (T1098887)
WPF Scheduler
- Change Selected Dates in Code (T1117470)
- Paint Resources in the ResourceTreeControl using Colors from the SchedulerControl (T1109951)
Miscellaneous
- Define a WpfSvgPalette in a View Model (T1107764)
- Apply a Different Theme to a Specific Element (T1112205)
- Hide Root Nodes Without Children in the TreeViewControl (T1113732)
- Display a ToolTip for the Category Tab Glyph in the PropertyGridControl (T1113950)
Updated WPF Examples
The following is a list of recently updated GitHub examples:
Data Grid
- WPF Data Grid - Customize the Appearance of Printed/Exported Information
- WPF Data Grid - Add Page Headers and Footers to Exported Data
- WPF Data Grid - Prevent Expand and Collapse Operations for Group Rows
- WPF Data Grid - Select Rows that Contain a Specific Value
- WPF Data Grid - Create a Custom Drop-down Filter
- WPF Data Grid - Use the GridControlLocalizer Class to Localize the Grid
- WPF Data Grid - Use Custom Editors to Edit Cell Values
Data Editors
- WPF LookUpEdit - Customize the Embedded Data Grid
- Populate ComboBoxEdit’s ItemsSource Based on Values from Other Cells
MVVM
- Display Notifications in MVVM Applications using the NotificationService
- Use the EventToCommand Behavior to Execute Commands when an Event is Raised
- Pass data between View Models through the ISupportParameter interface
- Create a Custom Service