XamlC warning XC0045: Binding: Property "BindingContext" for Source={RelativeSource TemplatedParent} #27292
-
Hi all I've enabled the following in .csproj so we can improve app performance following this link: <!--# Enables XAML Compilation with Source Generation for MAUI -->
<MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
<!--# Treats the specified warning as an error -->
<WarningsAsErrors>$(WarningsAsErrors);XC0022</WarningsAsErrors> I would like to know how to deal with these situations in XAML as we have a few of them scattered through our XAML files: BindingContext="{Binding BindingContext, Source={RelativeSource TemplatedParent}}" I am getting the following error:
And am wondering how we are meant to set the x:DataType for |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 12 replies
-
You can set the |
Beta Was this translation helpful? Give feedback.
@simonrozsival so having played with this further and on removing removing these property group items:
EnableLLVM
,AndroidCreatePackagePerAbi
,AndroidEnableMarshalMethods
Images are displaying now, not exactly sure which one i impacting things but seems to have resolved it for my release build.