InputGroup
Overview
Section titled “Overview”InputGroup is its own lookless Control (not a decorated TextBox) so the border and focus-ring
chrome lives in one place around all three regions: a leading adornment slot, the text input, and a
trailing adornment slot. The real TextBox is a template part (PART_Input), reachable via
GetTemplateChild for cases like attaching a validation adorner.
xmlns:inputGroup="clr-namespace:Navius.Wpf.Ui.InputGroup;assembly=Navius.Wpf.Ui"
<inputGroup:NaviusInputGroup Width="280" Placeholder="0.00"> <inputGroup:NaviusInputGroup.LeadingContent> <TextBlock Text="$" FontWeight="SemiBold" /> </inputGroup:NaviusInputGroup.LeadingContent> <inputGroup:NaviusInputGroup.TrailingContent> <TextBlock Text="USD" FontSize="12" /> </inputGroup:NaviusInputGroup.TrailingContent></inputGroup:NaviusInputGroup>Properties
Section titled “Properties”| Property | Type | Default | From | Description |
|---|---|---|---|---|
Text |
string |
"" |
NaviusInputGroup |
Two-way bindable by default. Bound to the template’s PART_Input textbox. |
Placeholder |
string? |
null |
NaviusInputGroup |
Shown in the template while Text is empty. |
LeadingContent |
object? |
null |
NaviusInputGroup |
Content shown before the input, e.g. a search icon or a fixed unit like "$". Hidden entirely (template trigger) when null. |
TrailingContent |
object? |
null |
NaviusInputGroup |
Content shown after the input, e.g. a clear button or a unit like "kg". Hidden entirely (template trigger) when null. |
IsReadOnly |
bool |
false |
NaviusInputGroup |
Forwarded to the inner PART_Input textbox’s IsReadOnly. |
Methods
Section titled “Methods”| Method | Description |
|---|---|
FocusInput() |
Focuses the underlying PART_Input textbox, once the template has applied. |
UIA mechanism
Section titled “UIA mechanism”NaviusInputGroup ships no custom automation peer; it derives from Control and inherits whatever
default peer WPF’s Control base provides. The M6 audit confirmed PART_Input’s lookup
(NaviusInputGroup.cs:81) matches the template’s x:Name="PART_Input" (InputGroup.xaml:44), and
that the template’s TwoWay binding from the inner TextBox to Text is valid because Text is a
read-write dependency property with a real setter, distinguishing it from the get-only-property bug
class the same audit found and fixed in Pagination. The unit suite verifies default state (empty
text, no adornments) and that text and adornment values round-trip.