Hello,
used: xmlns:behavior="clr-namespace:GssdDesktopClient.MAUI.Behaviors" in MyRootPage.
but when i used behavior on grid in data templates is not recognized the >behavior:CursorBehavior.Cursor="Hand"
what do I miss?
Please change the settings of .net 9.0 android to the .net 9.0-windows at the top-right corner.
Like this screenshot.
From Custom Cursor when hovering over View on Desktop #4552
You can see MauiCursor by VladislavAntonyuk for all platforms.
You can add cursorExtensions for different platforms.
Then create a CursorBehavior and add CursorProperty. You can control cursor is hand by local:CursorBehavior.Cursor="Hand"
, I set it to the VerticalStackLayout in the CollectionView
<CollectionView ItemsSource="{Binding LeaveSummarys}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Frame Padding="10" Margin="5" CornerRadius="10" BorderColor="Gray">
<VerticalStackLayout local:CursorBehavior.Cursor="Hand">
<Label Text="{Binding Name}" FontSize="18" FontAttributes="Bold"/>
<Label Text="{Binding TotalLeaveCount}" FontSize="16"/>
<Label Text="{Binding LeaveTaken}" FontSize="16"/>
</VerticalStackLayout>
</Frame>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
Best Regards,
Leon Lu
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.