In the latest version of SyncFusion Maui on macCatalyst my SfListView is not responding to selected item commands. It may be related to scroll viewers, measure sizes etc. as you can select an item when you click around the edges of the item template. The view works without issue on Windows.
Have other users found MacCatalyst controls being VERY bad under MacCatalyst on .net 9?
Issue seems to be my context flyout, when I remove it, the item selection works.... so question is around when we can expect a fix?
Hi John Taylor,
We have reviewed your reported query and prepared a sample using the information you provided. It appears that the SelectionChangedCommand is being invoked as expected.
Additionally, we tested it with a Flyout as you mentioned, and it worked as expected.
Could you please share the code snippet related to the Flyout and the ItemTemplate customization for the SfListView? This information will help us further validate the issue.
For your reference, we have attached the tested sample below.
Regards,
Riyas hameed M
Here is my XAML .... it works fine on Windows, but no item change detected on MacCatalyst. My current work around is to use a TapGestureRecognizer and change my selected item in the code behind.
<listview:SfListView x:Name="listView"
ItemsSource="{Binding Tracks}"
SelectedItem="{Binding SelectedTrack}"
ScrollBarVisibility="Default"
ItemSpacing="2"
>
<listview:SfListView.ItemTemplate>
<DataTemplate>
<Border Style="{StaticResource ItemBorder}" x:DataType="localDrum:RcRhythmTrack">
<FlyoutBase.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem
Text="{local:Translate DRUMPAD_SHIFT_UP}"
Command="{Binding ShiftTrackUpCommand}"
CommandParameter="{Binding}">
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA"
Glyph="{StaticResource up}"
Color="{
AppThemeBinding Default={StaticResource BlackOpacityPoint08},
Light={StaticResource BlackOpacityPoint08},
Dark=GhostWhite}"
Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutItem Text="{local:Translate DRUMPAD_SHIFT_DOWN}"
Command="{Binding ShiftTrackDownCommand}"
CommandParameter="{Binding}"
>
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource down}" Color="{AppThemeBinding Default={StaticResource BlackOpacityPoint08}, Light={StaticResource BlackOpacityPoint08}, Dark=GhostWhite}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="{local:Translate DRUMPAD_DELETE_TRACK}"
Command="{Binding DeleteTrackCommand}"
CommandParameter="{Binding}"
>
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource delete}" Color="{StaticResource PrimaryDark}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="{local:Translate DRUMPAD_COPY_TRACK}"
Command="{Binding CopyTrackCommand}"
CommandParameter="{Binding}"
>
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource copy}" Color="{AppThemeBinding Default={StaticResource BlackOpacityPoint08}, Light={StaticResource BlackOpacityPoint08}, Dark=GhostWhite}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutItem Text="{local:Translate DRUMPAD_PASTE_TRACK}"
Command="{Binding PasteTrackCommand}"
CommandParameter="{Binding}" >
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource paste}" Color="{AppThemeBinding Default={StaticResource BlackOpacityPoint08}, Light={StaticResource BlackOpacityPoint08}, Dark=GhostWhite}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
</MenuFlyout>
</FlyoutBase.ContextFlyout>
<Grid RowDefinitions="*,*" b:CursorBehavior.Cursor="Hand">
<HorizontalStackLayout Spacing="1">
<Label Text="{Binding TrackNo, StringFormat='{0})'}" Style="{StaticResource TrackLabel}" FontSize="12" />
<Label Text="{Binding TrackName}" Style="{StaticResource TrackLabel}" />
</HorizontalStackLayout>
<HorizontalStackLayout Grid.Row="1">
<Label Text="{Binding TrackDetails}" Style="{StaticResource TrackLabelDetails}" />
</HorizontalStackLayout>
</Grid>
</Border>
</DataTemplate>
</listview:SfListView.ItemTemplate>
<listview:SfListView.SelectedItemTemplate>
<DataTemplate>
<Border Style="{StaticResource SelectedItemBorder}" x:DataType="localDrum:RcRhythmTrack">
<FlyoutBase.ContextFlyout>
<MenuFlyout>
<MenuFlyoutItem
Text="{local:Translate DRUMPAD_SHIFT_UP}"
Command="{Binding ShiftTrackUpCommand}"
CommandParameter="{Binding}">
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA"
Glyph="{StaticResource up}"
Color="{
AppThemeBinding Default={StaticResource BlackOpacityPoint08},
Light={StaticResource BlackOpacityPoint08},
Dark=GhostWhite}"
Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutItem Text="{local:Translate DRUMPAD_SHIFT_DOWN}"
Command="{Binding ShiftTrackDownCommand}"
CommandParameter="{Binding}"
>
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource down}" Color="{AppThemeBinding Default={StaticResource BlackOpacityPoint08}, Light={StaticResource BlackOpacityPoint08}, Dark=GhostWhite}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="{local:Translate DRUMPAD_DELETE_TRACK}"
Command="{Binding DeleteTrackCommand}"
CommandParameter="{Binding}"
>
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource delete}" Color="{StaticResource PrimaryDark}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutSeparator />
<MenuFlyoutItem Text="{local:Translate DRUMPAD_COPY_TRACK}"
Command="{Binding CopyTrackCommand}"
CommandParameter="{Binding}"
>
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource copy}" Color="{AppThemeBinding Default={StaticResource BlackOpacityPoint08}, Light={StaticResource BlackOpacityPoint08}, Dark=GhostWhite}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
<MenuFlyoutItem Text="{local:Translate DRUMPAD_PASTE_TRACK}"
Command="{Binding PasteTrackCommand}"
CommandParameter="{Binding}" >
<MenuFlyoutItem.IconImageSource>
<FontImageSource FontFamily="FA" Glyph="{StaticResource paste}" Color="{AppThemeBinding Default={StaticResource BlackOpacityPoint08}, Light={StaticResource BlackOpacityPoint08}, Dark=GhostWhite}" Size="22"/>
</MenuFlyoutItem.IconImageSource>
</MenuFlyoutItem>
</MenuFlyout>
</FlyoutBase.ContextFlyout>
<Grid RowDefinitions="*,*" b:CursorBehavior.Cursor="Hand">
<HorizontalStackLayout Spacing="1">
<Label Text="{Binding TrackNo, StringFormat='{0})'}" Style="{StaticResource SelectedTrackLabel}" FontSize="12" />
<Label Text="{Binding TrackName}" Style="{StaticResource SelectedTrackLabel}" />
</HorizontalStackLayout>
<HorizontalStackLayout Grid.Row="1">
<Label Text="{Binding TrackDetails}" Style="{StaticResource TrackLabelDetails}" />
</HorizontalStackLayout>
</Grid>
</Border>
</DataTemplate>
</listview:SfListView.SelectedItemTemplate>
</listview:SfListView>
Hi John Taylor,
We have validated the reported query and would like to inform you that, as mentioned earlier, on iOS, when a child view such as a context flyout handles touch events, it prevents the parent element (like a ListViewItem) from receiving those touch inputs. As a result, built-in functionalities such as item selection and selection commands may not work as expected.
To address this, we have prepared a sample that displays a context menu–like structure using the SfPopup control during a right-click. While we attempted to implement right-tap detection for the ListView, this interaction is not functioning as expected on macOS at the framework level itself. We are currently analyzing this behavior in the framework to detect right-tap interactions.
As an alternative, we have prepared another sample that displays the context menu using a long-press gesture instead of a right-click. This sample is attached below for your reference.
We are continuing to validate the right-tap scenario and are working toward resolving this issue in our source. We will provide you with an update by May 28, 2025. We appreciate your patience and understanding in the meantime.
Regards,
Riyas Hameed M
Riyas Hameed M
Hi John Taylor,
We have resolved the RightTapped event issue on our end and have attached a workaround sample for your reference. In this sample, we have achieved the same behavior as the context flyout using a popup.
We hope this helps. If you have any further questions, please feel free to ask.
Regards,
Riyas Hameed M