Skip to content

Spurious XFC0040 errors. #21848

Closed
Closed
@RobTF

Description

Description

I have a style in a XAML file which looks like this;

    <Style TargetType="{x:Type tctrls:ScrollableTileView}">
        <Setter Property="Padding" Value="2" />
    </Style>

When I build I get the following output which points at the Setter line;

XamlC error XFC0040: Cannot convert value "Padding" to "Microsoft.Maui.Controls.BindableProperty".

The type tctrls:ScrollableTileView is a very simple class which inherits from ContentView so the Padding property is just the normal MAUI property, not some custom property I have defined.

Any ideas why this might be? There are no problems with MAUI 8 SR3.

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.20 SR4

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.10 SR3

Affected platforms

iOS, Android

Affected platform versions

All versions of iOS, Android. Probably all others too.

Did you find any workaround?

Not yet.

Relevant log output

XamlC error XFC0040: Cannot convert value "Padding" to "Microsoft.Maui.Controls.BindableProperty".

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions