ImageResourceConverter - Binding could be compiled to improve runtime performance if x:DataType is not explicitly null. #2445
-
Hi All, I have enabled the following in my csproj, that is to take advantage of compiled bindings <MauiEnableXamlCBindingWithSourceCompilation>true</MauiEnableXamlCBindingWithSourceCompilation>
<WarningsAsErrors>$(WarningsAsErrors);XC0022;XC0023</WarningsAsErrors> When I use the following I get an error that the binding could be compiled to improve runtime performance which I expect but I cannot seem to get past the error <Image
Grid.Column="0"
x:DataType="{x:Null}"
Aspect="AspectFit"
HeightRequest="24"
Source="{Binding Source={StaticResource ConversationImageSource}, Converter={StaticResource ImageResourceConverter}}"
VerticalOptions="Center"
WidthRequest="24" /> If I disable/remove the Is it possible to use compiled binding in this case so I can keep the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Why are you setting |
Beta Was this translation helpful? Give feedback.
Using
x:DataType="{x:Type Image}"
resolved it, I thought there was something else needed here but maybe that's all.