Open davidortinau opened 1 year ago
Maybe related Button inside a collectionview worked in .net 7. Updated to .net 8 preview 6. Now the command parameter is null. Hardcode a value does work but not bind to it so the workaround does not work here.
<Button Grid.Row="1" Grid.Column="2" Grid.RowSpan="2" Text="TitleText" HorizontalOptions="End" VerticalOptions="CenterAndExpand" Command="{Binding BindingContext.GoToFollowTrackCommand, Source={x:Reference TracksCollection}}" CommandParameter="{Binding . }"/>
We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.
we have test showing that this works, at least in some cases. do you have a sample case where it does not ?
can I close this, @davidortinau ?
Description
When doing a binding to the item object the value is null in a value converter.
Example:
Text={Binding ., Converter={StaticResource MyConverter}}
This works in Xamarin.Forms but not MAUI. In MAUI I must supply a property.
Steps to Reproduce
See description
Link to public reproduction project repository
MAUI-samples
Version with bug
8.0.0-preview.5.8529
Last version that worked well
Unknown/Other
Affected platforms
iOS, Android, Windows, macOS, Other (Tizen, Linux, etc. not supported by Microsoft directly)
Affected platform versions
All
Did you find any workaround?
Workaround is to add a getter on the object that returns itself.
And then
Text={Binding Self, Converter={StaticResource MyConverter}}
Relevant log output
No response