Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InputField BorderThicknessProperty name is wrong #463

Closed
enisn opened this issue Oct 13, 2023 · 0 comments
Closed

InputField BorderThicknessProperty name is wrong #463

enisn opened this issue Oct 13, 2023 · 0 comments
Labels
Milestone

Comments

@enisn
Copy link
Owner

enisn commented Oct 13, 2023

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:

[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: Microsoft.Maui.Controls.Xaml.XamlParseException: Position 12:37. Type converter failed: Exception has been thrown by the target of an invocation.
[mono-rt]  ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
[mono-rt]  ---> Microsoft.Maui.Controls.Xaml.XamlParseException: Position 76:37. The PropertyName of TextField.BorderThicknessProperty is not BorderThickness

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.

Originally posted by @seanjaeger73 in #462

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant