Skip to content

[Bug] StyleClass Setter does not set #11204

@Phenek

Description

@Phenek

Description

I am no able to set the Border properties from Xaml Style Setter.
I am using specificaly the StyleClass functionality on Border.

Steps to Reproduce

<Style TargetType="Border" Class="BorderStyle"
       ApplyToDerivedTypes="true">
    <Setter Property="VisualStateManager.VisualStateGroups">
        <VisualStateGroupList>
            <VisualStateGroup x:Name="CommonStates">
                <VisualState x:Name="State1">
                    <VisualState.Setters>
                        <Setter Property="Background"
                                        Value="Blue" />
                        <Setter Property="Stroke"
                                        Value="Red" />
                        <Setter Property="StrokeShape"
                                        Value="RoundRectangle 10,10,10,10" />
                        <Setter Property="StrokeThickness"
                                        Value="2" />
                    </VisualState.Setters>
                </VisualState>
            </VisualStateGroup>
        </VisualStateGroupList>
    </Setter>
</Style>

Link to public reproduction project repository

https://github.com/Phenek/Maui-Issue/tree/issue/11204 => branch 11204

Version with bug

7.0 Release Candidate 2

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

iOS 16, Android API 33

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions