Plugin.ContextMenuContainer
1.0.3
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
dotnet add package Plugin.ContextMenuContainer --version 1.0.3
NuGet\Install-Package Plugin.ContextMenuContainer -Version 1.0.3
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.ContextMenuContainer" Version="1.0.3" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Plugin.ContextMenuContainer --version 1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Plugin.ContextMenuContainer, 1.0.3"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Plugin.ContextMenuContainer as a Cake Addin #addin nuget:?package=Plugin.ContextMenuContainer&version=1.0.3 // Install Plugin.ContextMenuContainer as a Cake Tool #tool nuget:?package=Plugin.ContextMenuContainer&version=1.0.3
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
ContextMenuContainer
Maui plugin to add native context menu to any view. Supports UWP, Android and iOS currently.
How to use
Add namespace to your XAML file
xmlns:cm="https://github.com/jerry08/Plugin.ContextMenuContainer"
Add the following handler to your Maui startup class
handlers.AddHandler(typeof(Plugin.ContextMenuContainer), typeof(Plugin.ContextMenuContainerRenderer));
- Wrap your view with
ContextMenuContainer
, define your context actions inline or bind from your ViewModel
//Inline
<cm:ContextMenuContainer x:Name="ActionsInline">
<cm:ContextMenuContainer.MenuItems>
<cm:ContextMenuItem
Text="My action"
Command="{Binding MyCommand}"
CommandParameter="{Binding .}" />
<cm:ContextMenuItem
Text="My destructive action"
Command="{Binding MyDestructiveCommand}"
CommandParameter="{Binding .}"
IsDestructive="True"
Icon="{Binding DestructiveIconSource}"/>
</cm:ContextMenuContainer.MenuItems>
<cm:ContextMenuContainer.Content>
<Label Text="Hold me!"/>
</cm:ContextMenuContainer.Content>
</cm:ContextMenuContainer>
//From binding
<cm:ContextMenuContainer
x:Name="ContextActionsWithBinding"
MenuItems="{Binding ImageContextItems}">
<cm:ContextMenuContainer.Content>
<Frame>
<Image Source="{Binding IconSource}"/>
</Frame>
</cm:ContextMenuContainer.Content>
</apes:ContextMenuContainer>
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-android31.0 is compatible. net6.0-android33.0 is compatible. net6.0-ios was computed. net6.0-ios16.0 is compatible. net6.0-maccatalyst was computed. net6.0-maccatalyst15.4 is compatible. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net6.0-windows10.0.19041 is compatible. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- No dependencies.
-
net6.0-android31.0
- No dependencies.
-
net6.0-android33.0
- No dependencies.
-
net6.0-ios16.0
-
net6.0-maccatalyst15.4
-
net6.0-windows10.0.19041
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories (2)
Showing the top 2 popular GitHub repositories that depend on Plugin.ContextMenuContainer:
Repository | Stars |
---|---|
jerry08/Anikin
A multi-platform app to stream/download videos.
|
|
jerry08/Yosu
Downloads videos, tracks and playlists from YouTube, Soundcloud and Spotify
|