Resizable
Overview
Section titled “Overview”Resizable is a convenience host for a row (or column) of resizable panes: the consumer declares
each pane as a plain child element, exactly like a StackPanel, and NaviusResizablePanelGroup
does a one-time expansion into a real Grid with star-sized ColumnDefinitions (or
RowDefinitions) plus an auto-inserted, keyed-styled GridSplitter between every adjacent pair.
It derives from Grid directly rather than reimplementing star-sizing and drag-resize math
Grid/GridSplitter already provide.
xmlns:resizable="clr-namespace:Navius.Wpf.Ui.Resizable;assembly=Navius.Wpf.Ui"
<ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="pack://application:,,,/Navius.Wpf.Ui;component/Themes/Resizable.xaml" /></ResourceDictionary.MergedDictionaries>
<resizable:NaviusResizablePanelGroup Height="140"> <Border Background="{DynamicResource Navius.Card}" BorderBrush="{DynamicResource Navius.Border}" BorderThickness="1" resizable:NaviusResizablePanelGroup.MinSize="80"> <TextBlock Text="Pane 1" /> </Border> <Border Background="{DynamicResource Navius.Card}" BorderBrush="{DynamicResource Navius.Border}" BorderThickness="1" resizable:NaviusResizablePanelGroup.MinSize="80" resizable:NaviusResizablePanelGroup.InitialSize="2"> <TextBlock Text="Pane 2 (double star-weight)" /> </Border> <Border Background="{DynamicResource Navius.Card}" BorderBrush="{DynamicResource Navius.Border}" BorderThickness="1" resizable:NaviusResizablePanelGroup.MinSize="80"> <TextBlock Text="Pane 3" /> </Border></resizable:NaviusResizablePanelGroup>The expansion runs automatically from OnInitialized, so panes declared as XAML children are
already expanded by the time the page loads; building the group in code-behind instead requires
calling EnsureExpanded() after adding children.
Properties
Section titled “Properties”| Property | Type | Default | From | Description |
|---|---|---|---|---|
Orientation |
Orientation |
Horizontal |
NaviusResizablePanelGroup |
Horizontal uses columns; Vertical uses rows. |
SplitterThickness |
double |
9 |
NaviusResizablePanelGroup |
Width (Horizontal) or height (Vertical) reserved for each inserted GridSplitter. |
NaviusResizablePanelGroup.InitialSize (attached) |
double |
1 |
NaviusResizablePanelGroup |
Set on a pane to give it a star-weight (proportional size) relative to its siblings. |
NaviusResizablePanelGroup.MinSize (attached) |
double |
48 |
NaviusResizablePanelGroup |
Set on a pane to give it a minimum width (Horizontal) or height (Vertical). |
Methods
Section titled “Methods”| Method | Description |
|---|---|
EnsureExpanded() |
Runs the one-time expansion of declared children into panes plus splitters. Idempotent: a second call with the same children is a no-op. Called automatically from OnInitialized; call it directly when panes are added in code-behind after construction. |
Keyboard interactions
Section titled “Keyboard interactions”| Key | Behavior |
|---|---|
Arrow keys (when a splitter has focus) |
Native GridSplitter keyboard resize; the splitter styles in Themes/Resizable.xaml set Focusable="True" but add no keyboard handling of their own. |
UIA mechanism
Section titled “UIA mechanism”NaviusResizablePanelGroup ships no custom automation peer; as a Grid subclass it creates none
by default and is transparent to UI Automation. The inserted dividers are stock WPF GridSplitter
instances (re-skinned via Navius.Splitter.Horizontal/Navius.Splitter.Vertical styles in
Themes/Resizable.xaml), carrying whatever native automation support GridSplitter provides on
its own; this family’s code does not touch it. The unit suite exercises the expansion logic
(ResizablePanelGroup_ExpandsPanesWithSplittersBetween, _VerticalOrientation_UsesRowDefinitions,
_EnsureExpanded_IsIdempotent) against real Grid.Children/ColumnDefinitions/RowDefinitions,
not automation surface.