I need to select item with right-click in the ListBox control. How to do it in UWP?
Thank you. Best wishes.
You can add the RightTapped
event in your item.
<ListView ItemsSource="{x:Bind TheData}">
<ListView.ItemTemplate>
<DataTemplate>
<Grid Background="#FFda2a5c" RightTapped="GridColection_OnRightTapped">
<TextBlock Text="{Binding}"></TextBlock>
</Grid>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
And then you can write the GridColection_OnRightTapped
in your code and handle the right click event