TextBox HelperText Collapsed #3191
-
|
Have a nice day!
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
@Frillaut Interesting find! And your assumption is spot on. This is the helper text "area" causing the One option could be to set The above of course requires a change to the library. So as a temporary solution, you could try to override the <StackPanel>
<StackPanel.Resources>
<Style x:Key="CustomHelperTextStyle" TargetType="TextBlock" BasedOn="{StaticResource {x:Type TextBlock}}">
<Setter Property="IsHitTestVisible" Value="False" />
</Style>
</StackPanel.Resources>
<TextBox Style="{StaticResource MaterialDesignFilledTextBox}" materialDesign:HintAssist.HelperTextStyle="{StaticResource CustomHelperTextStyle}"/>
<Border Background="Red" Height="14" IsHitTestVisible="False"/>
</StackPanel>That might "solve" your issue, but probably a somewhat fragile approach; that style is not applied to the character counter for example, and in case it is visible it would probably trigger the same issue when hovering that. |
Beta Was this translation helpful? Give feedback.
-
|
What I don't understand is how a Border affects the workings of a separate element, in this case a TextBox. By the way, I tested the original question code, and yes, clicking on the red border causes the TextBox to receive focus. |
Beta Was this translation helpful? Give feedback.

@Frillaut Interesting find! And your assumption is spot on. This is the helper text "area" causing the
IsMouseOverto become true.One option could be to set
IsHitTestVisibleon the "FooterGrid" (see code). I'm not sure why anyone would ever want the "focus" to trigger when hovering a visible helper text; I'd only expect it when hovering the "standard content" of theTextBoxcontrol.The above of course requires a change to the library. So as a temporary solution, you could try to override the
HintAssist.HelperTextStyleand set that toIsHitTestVisible=false: