Skip to content

ImageResourceConverter - Binding could be compiled to improve runtime performance if x:DataType is not explicitly null. #2445

Answered by LeoJHarris
LeoJHarris asked this question in Q&A
Discussion options

You must be logged in to vote

in case anyone stumbles on this, the solution ended up quite simple :DataType=x:String as suggested here dotnet/maui#27292 (reply in thread)

 Source="{Binding Source={StaticResource LogoVariant2ImageSource}, Converter={StaticResource ImageResourceConverter}, x:DataType=x:String}"

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@LeoJHarris
Comment options

Comment options

You must be logged in to vote
1 reply
@LeoJHarris
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by LeoJHarris
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants