问题描述
在最新版本的 MaterialDesign WPF 中,出现了这个问题.
是否有任何财产或其他东西可以隐藏它?
In latest version of MaterialDesign WPF this problem is showing.
Is there any property or something else to hide it?
- MaterialDesignThemes 4.0.0 版
- MaterialDesignColors 2.0.0 版
代码:
<TextBox materialDesign:HintAssist.Hint="First Name" FontSize="18" Style="{StaticResource MaterialDesignFloatingHintTextBox}" MaxLength="50"/>
推荐答案
GitHub 上已经有一个关于如何隐藏字符计数器的问题.
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.
在下一个版本中将有一个新的附加属性,您可以使用它来隐藏字符计数器.
<TextBox
MaxLength=""10""
materialDesign:TextFieldAssist.CharacterCounterVisibility=""Collapsed""/>
与此同时,您可以降级到以前版本的 MaterialDesign,因为此功能是 在 4.0 版中引入 或者您可以使用 建议的解决方法在问题中.
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>
这篇关于如何在 MaterialDesign 中隐藏 TextBox 底部的字母计数器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!