Visual State Manager - Material TextField #462
-
I am attempting to change the border thickness on visual state Focused for the Material TextField input. This works as an inline style and even a contentview resource placed in the resourcedictionary... but if I place this in the "Styles.xaml" as key'd or unkey'd, the application crashes with the following error:
This is the setter I am trying to use: <Style TargetType="material:TextField">
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList x:Name="CommonStates">
<VisualStateGroup>
<VisualState x:Name="Normal">
<VisualState.Setters>
<Setter Property="BorderThickness" Value="1" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Focused">
<VisualState.Setters>
<Setter Property="BorderThickness" Value="2" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style> Any help would be appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
You're right, because the name of the BorderThicknessProperty is defined as |
Beta Was this translation helpful? Give feedback.
-
I was finally able to implement the border thickness after the fix applied. Unfortunately, any thickness set greater than 1.2 or so messes up the floating label: Is there another style that I can set to increase left padding on the floating label? Thank you, |
Beta Was this translation helpful? Give feedback.
-
Resolved by #574 It'll be released in the next v2.8 release soon |
Beta Was this translation helpful? Give feedback.
You're right, because the name of the BorderThicknessProperty is defined as
BorderColor
by mistake. I'll create an issue and fix it ina patch versionhttps://github.com/enisn/UraniumUI/blob/cc982f9e435626f258632060af9d30a0ab41e643/src/UraniumUI.Material/Controls/InputField.cs#L382C16-L382C27