MaterialDesignInXAML / MaterialDesignInXAML/MaterialDesignInXamlToolkit
Input control hints and underline lost when in ColorZone
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 16.3k
- Forks
- 3.5k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 8
Description
Bug explanation
The hint, underline and cursor on TextBox and ComboBox go to primary brush when selected. The underline goes to primary on mouse over as well. If these controls are within a colorzone, with mode set to mid, these elements disappear on selection/hover.
This is true for various styles such as MaterialDesignFloatingHintTextBox/ComboBox and MaterialDesignOutlinedTextBox/ComboBox
I expect the control to choose a more appropriate highlight color (driven by the colorzone perhaps) or allow the selected highlight color to be overridden.
<materialDesign:ColorZone Mode="PrimaryMid" Grid.Row="1" Padding="8">
<StackPanel>
<TextBox Style="{DynamicResource MaterialDesignFloatingHintTextBox}" Text="Some Value" materialDesign:HintAssist.Hint="Some Hint"/>
<ComboBox Style="{DynamicResource MaterialDesignFloatingHintComboBox}" SelectedIndex="0" materialDesign:HintAssist.Hint="Some Options">
<ComboBox.Items>
<ComboBoxItem Content="Stuff"/>
<ComboBoxItem Content="Things"/>
</ComboBox.Items>
</ComboBox>
<TextBox Style="{DynamicResource MaterialDesignOutlinedTextBox}" Text="Some Value" materialDesign:HintAssist.Hint="Some Hint"/>
<ComboBox Style="{DynamicResource MaterialDesignOutlinedComboBox}" SelectedIndex="0" materialDesign:HintAssist.Hint="Some Options">
<ComboBox.Items>
<ComboBoxItem Content="Stuff"/>
<ComboBoxItem Content="Things"/>
</ComboBox.Items>
</ComboBox>
</StackPanel>
</materialDesign:ColorZone>
Version
5.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ColorZone styling and the MaterialDesignFloatingHint/Outlined TextBox and ComboBox style definitions; reproduce the supplied XAML with ColorZone Mode="PrimaryMid" and inspect the brushes used for hints, underlines, and cursors on hover or selection. Done means these elements remain visible with an appropriate or overridable highlight color across the listed styles, with regression coverage if the project provides it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- design, desktop
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100