Skip to content

[UpDown control] Forward HintAssist.HintPaddingBrush into nested TextBox of UpDown#3857

Merged
Keboo merged 1 commit intomasterfrom
forwardHintPaddingBrush
Jun 6, 2025
Merged

[UpDown control] Forward HintAssist.HintPaddingBrush into nested TextBox of UpDown#3857
Keboo merged 1 commit intomasterfrom
forwardHintPaddingBrush

Conversation

@nicolaihenriksen
Copy link
Copy Markdown
Contributor

Ran into a small issue when using the UpDown variants inside of a custom background (e.g. a ColorZone). For the outlined style, the hint sits on top of the outline border when it is floating, and has a background set to hide the outline below the hint.

For non-default backgrounds, the HintAssist.HintPaddingBrush can be used to ensure this behavior is maintained. However, this AP was not forwarded through in the UpDown case. This PR does just that. Also fixed indentation, so possibly hiding whitespaces in the diff will show you a better diff.

For this XAML

<materialDesign:ColorZone x:Name="MyColorZone" Mode="PrimaryLight" Padding="10" Width="150">
  <materialDesign:DecimalUpDown Style="{StaticResource MaterialDesignOutlinedDecimalUpDown}"
                                materialDesign:HintAssist.HintPaddingBrush="{Binding ElementName=MyColorZone, Path=Background}"
                                materialDesign:HintAssist.Hint="The hint" />
</materialDesign:ColorZone>

Before (AP not forwarded)
image

After (AP forwarded)
image

@nicolaihenriksen nicolaihenriksen self-assigned this Jun 1, 2025
@Keboo Keboo added this to the 5.3.0 milestone Jun 6, 2025
@Keboo Keboo merged commit 6cef2f5 into master Jun 6, 2025
2 checks passed
@Keboo Keboo deleted the forwardHintPaddingBrush branch June 6, 2025 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants