maui icon indicating copy to clipboard operation
maui copied to clipboard

Spurious `XFC0040` errors.

Open RobTF opened this issue 1 year ago • 3 comments

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".

RobTF avatar Apr 15 '24 17:04 RobTF

Have a look at #21757 , there is a workaround or you can revert to previous MAUI version

nll avatar Apr 15 '24 18:04 nll

Verified this issue with Visual Studio 17.10.0 Preview 3(8.0.20). Can repro it but not repro in Maui control version:8.0.14 image

ninachen03 avatar Apr 16 '24 03:04 ninachen03

Thanks guys that's really useful! That said we'll be stepping away from this release as that's too big a problem for us even with the supposed workaround.

RobTF avatar Apr 16 '24 10:04 RobTF

Duplicate of #21757

PureWeen avatar Apr 16 '24 18:04 PureWeen

8.0.40 Ran into this issue again.

CodingOctocat avatar May 28 '24 06:05 CodingOctocat