We hope you are all doing well. Thanks for your continued support and for choosing our WPF product line.
If you’d like more information on the tips & tricks listed below, please submit a comment or create a new support ticket.
TIPS
- Floating panels within the Dock Layout Manager can size themselves to automatically fit content. Use the attached FloatGroup.SizeToContent property to enable this functionality.
- You can display a Select All checkbox for columns bound to Boolean properties: ShowCheckBoxInHeader (see: How to: Display a Check Box within Column Headers). Group rows can also display checkboxes for these columns: GroupRowCheckBoxFieldName.
- The
DXSerializer
class allows you to control the serialization process when you save and/or restore a layout: How to use the DXSerializer class to control the layout serialization process of DevExpress controls. - Panels from separate Dock Layout Managers can work together - as if they belong to the same manager. To enable this behavior, simply link these managers via the DockLayoutManagerLinker.Link method.
- To find an element based on a specific condition in the visual or logical tree, use our LayoutTreeHelper class. Its methods return LINQ compatible collections.
TRICKS
- You can filter appointments from our WPF Scheduler control – no need to remove appointments/events from the underlying source. Filter Appointments and Time Regions.
- To automatically generate editors for data item properties, use Data Layout Control. Add Layout Generation Attributes to data item properties if you wish to modify the layout generated by this control.
- Our pre-built behavior classes can help you create theme selectors for your application:
TICKETS
WPF Data Grid
- How to automatically scroll Data Grid / Tree List to display a focused item in the center of the viewport (T970461)
- How to use the IsReadOnly property in CellTemplate (T970323)
- How to show a wait indicator for a row while its data is being processed on the server side (T969413)
A custom element can be displayed within row indicators. Declare a custom DataTemplate in the RowIndicatorContentTemplate property.
- How to show only one card in Card View (T965477)
- How to programmatically select a tab in TabViewDetailDescriptor (T966061)
- How to change the FitColumnHeader and IndicatorColumnHeader background in Data Grid (T966745)
Define the
Background
property in custom implicit styles:... <dxg:GridControl.Resources> <Style TargetType="dxg:FitColumnHeader"> <Setter Property="Background" Value="Red" /> </Style> <Style TargetType="dxg:IndicatorColumnHeader"> <Setter Property="Background" Value="Red" /> </Style> </dxg:GridControl.Resources> ...
- How to focus Search Panel after the Data Grid is loaded (T966754)
WPF Ribbon
- How to open modules in separate windows when MIF is used (T971967)
To open a separate window within a module, use the
UIWindowRegion
class. Add it to theApplication.Resources
collection in theApp.xaml
file:<Application ... xmlns:dxmvvm="http://schemas.devexpress.com/winfx/2008/xaml/mvvm" xmlns:dx="http://schemas.devexpress.com/winfx/2008/xaml/core"> <Application.Resources> <dxmvvm:UIWindowRegion x:Key="WindowsService" RegionName="Windows"> <dxmvvm:UIWindowRegion.WindowFactory> <DataTemplate> <dx:ThemedWindow Width="1000" Height="600" Title="Some info"/> </DataTemplate> </dxmvvm:UIWindowRegion.WindowFactory> </dxmvvm:UIWindowRegion> </Application.Resources> </Application>
Manager.Register("Windows", new Module(AppModules.Module1, () => ModuleViewModel.Create("Module1"), typeof(ModuleView))); public void Test(){ ModuleManager.DefaultManager.InjectOrNavigate("Windows", DXApplication34.Common.Modules.Module1); }
WPF Editors
- How to prevent the popup from being opened for a read-only ComboBoxEdit (T968954)
Set the ShowPopupIfReadOnly property to
False
. - How to use DataAnnotation attributes to format values in editors (T965702)
WPF Property Grid
- How to bind Property Grid to XML data (T969916)
WPF Scheduler
WPF Charting
- How to create custom annotation labels for each argument in a Side-by-side Bar Chart (T968597)
- Crosshair Cursor - How to add custom content below crosshair labels (T969732)
Other controls
- How to change the initial position of CustomNotifications (T969421)
- How to create a mock object for DialogService's extension methods (T965088)
- Buttons lose focus when FocusManager.IsFocusScope is set to "True" in the parent Document Panel (T973918)
- How to change the background of the standard RichTextBox depending on a currently applied theme (T973173)