Closed Ares-87 closed 3 years ago
Looks like you are wanting something similar to what was requested here.
Simply setting an empty style to the TextFieldAssist.CharacterCounterStyle
property.
<TextBox>
<materialDesign:TextFieldAssist.CharacterCounterStyle>
<Style TargetType="TextBlock" />
</materialDesign:TextFieldAssist.CharacterCounterStyle>
</TextBox>
Looks like you are wanting something similar to what was requested here. Simply setting an empty style to the
TextFieldAssist.CharacterCounterStyle
property.<TextBox> <materialDesign:TextFieldAssist.CharacterCounterStyle> <Style TargetType="TextBlock" /> </materialDesign:TextFieldAssist.CharacterCounterStyle> </TextBox>
Thank you, but there is a way to disable to all Textboxes by xaml Style?
Yes, you can create an implicit style targeting TextBoxes. You can put something like this in your App.xaml.
<Style TargetType="TextBox" BasedOn="{StaticResource MaterialDesignTextBox}">
<Setter Property="materialDesign:TextFieldAssist.CharacterCounterStyle">
<Setter.Value>
<Style TargetType="TextBlock" />
</Setter.Value>
</Setter>
</Style>
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""
/>
Thank you so much!
Yes, you can create an implicit style targeting TextBoxes. You can put something like this in your App.xaml.
<Style TargetType="TextBox" BasedOn="{StaticResource MaterialDesignTextBox}"> <Setter Property="materialDesign:TextFieldAssist.CharacterCounterStyle"> <Setter.Value> <Style TargetType="TextBlock" /> </Setter.Value> </Setter> </Style>
Hi everyone,
I had the same trouble and I did:
<Setter Property="materialDesign:TextFieldAssist.CharacterCounterStyle" Value="{x:Null}" />
Thank you all.
can materialDesign:TextFieldAssist.CharacterCounterVisibility be set from code-behind?
Hi, after latest update, my textboxes show by default the character counter under the box.
To remove it, I tried to add a default style inside my xaml, like this:
Style="{DynamicResource MaterialDesignTextBoxBase}"
Unfortunately this not solve the problem. How I can disable min/max lenght counte? Thank you.