如何打开mudblazor树视图的上下文菜单



我正试图在树视图的节点上右键单击打开一个上下文菜单,如何做到这一点?我没有在mudblaczor文档中找到任何内容

<MudMenu PositionAtCursor="true" ActivationEvent="@MouseEvent.RightClick">
<ActivatorContent>
<MudTreeView T="ItemResponse"
Color="Color.Primary"
Items="@Items.ToHashSet()"
@bind-ActivatedValue="SelectedItem"
Hover=true>
<ItemTemplate>
<MudTreeViewItem Items="@context.Items.ToHashSet()"
@bindExpanded="@context.IsExpanded"
Value="@context"
Text="@context.DisplayMember"
Icon="@context.Icon"
EndText="@context.Value"
EndTextTypo="@Typo.body1">
</MudTreeViewItem>
</ItemTemplate>
</MudTreeView>
</ActivatorContent>
<ChildContent>
<MudMenuItem>Delete</MudMenuItem>
<MudMenuItem>Edit</MudMenuItem>
</ChildContent>
</MudMenu>

相关内容

  • 没有找到相关文章

最新更新