The DaxStudio.Controls library provides a set of controls and utilities for building user interfaces in DAX Studio. This documentation covers the main components, their usage, and some best practices.
Currently this libarary contains the following main components:
- DaxStudio.Controls.TreeGrid: A hierarchical data grid control that supports expandable rows and custom rendering.
- The tree column can be placed anywhere in the grid, it does not need to be the first column
- Optional highlighting for the path to the selected node's children
- Supports binding to POCO objects (no need to inherit from a specific base class)
- The TreeColumn supports templating for icons, text, and expanders
- Designed to work with MVVM pattern
- Built-in context menu with expand/collapse operations
- High-performance virtualization for large datasets
- Thread-safe operations
- Add a reference to the TreeGrid control in your WPF app
- Add a TreeGrid to your page/window
- Bind the RootItems property to a collection in your DataContext
- Set the ChildrenBindingPath to the name of the field for the child items collection
| Property | Type | Default | Description |
|---|---|---|---|
| AddCustomMenusAtBottom | bool | true | Controls whether custom menu items appear at the bottom or top of context menu |
| ChildrenBindingPath | string | "" | The path to the property containing child items (e.g., "Children") |
| CustomDescendantFilter | Func<object,object,bool> | null | Custom filter predicate for tree filtering operations |
| ExpandOnLoad | bool | false | Whether to expand all nodes when the control loads |
| RootItems | IEnumerable | null | The root-level items to display in the hierarchy |
| ShowDefaultContextMenu | bool | true | Shows/hides the built-in context menu with expand/collapse options |
| Method | Type | Default | Description |
|---|---|---|---|
| ExecuteCustomDescendantFilter | ICommand | - | Command that executes the custom filter functionality |
