How can I hide letter counter at the bottom of TextBox in MaterialDesign

Viewed 916

TextBox with character counter at the bottom.

In latest version of MaterialDesign WPF this problem is showing.
Is there any property or something else to hide it?

  • MaterialDesignThemes Version 4.0.0
  • MaterialDesignColors Version 2.0.0

Code:

<TextBox materialDesign:HintAssist.Hint="First Name" FontSize="18" Style="{StaticResource MaterialDesignFloatingHintTextBox}" MaxLength="50"/>
1 Answers

There is already an issue on GitHub concerning how to hide the character counter.

It is already confirmed that there will be a way to disable it in the upcoming release.

In the next release there will be a new attached property you can use to hide the character counter.

<TextBox
   MaxLength=""10""
   materialDesign:TextFieldAssist.CharacterCounterVisibility=""Collapsed""/>

In the meanwhile you can either downgrade to a previous version of MaterialDesign, as this feature was introduced in version 4.0 or you can use the workaround suggested in the issue.

<TextBox>
    <materialDesign:TextFieldAssist.CharacterCounterStyle>
        <Style TargetType="TextBlock" />
    </materialDesign:TextFieldAssist.CharacterCounterStyle>
</TextBox>
Related