Plugin.ContextMenuContainer 1.0.8

dotnet add package Plugin.ContextMenuContainer --version 1.0.8
                    
NuGet\Install-Package Plugin.ContextMenuContainer -Version 1.0.8
                    
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.8" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.ContextMenuContainer" Version="1.0.8" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.ContextMenuContainer" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.ContextMenuContainer --version 1.0.8
                    
#r "nuget: Plugin.ContextMenuContainer, 1.0.8"
                    
#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.
#addin nuget:?package=Plugin.ContextMenuContainer&version=1.0.8
                    
Install Plugin.ContextMenuContainer as a Cake Addin
#tool nuget:?package=Plugin.ContextMenuContainer&version=1.0.8
                    
Install Plugin.ContextMenuContainer as a Cake Tool

ContextMenuContainer

Version Downloads

Maui plugin to add native context menu to any view. Supports all .NET MAUI platforms.

Usage

  1. Add the .ConfigureContextMenuContainer() in your MauiProgram.cs as shown below:
using Plugin.ContextMenuContainer;
builder
    .UseMauiApp<App>()
    .UseMauiCommunityToolkit()
    .ConfigureContextMenuContainer();
  1. Add namespace to your XAML file xmlns:cm="https://github.com/jerry08/Plugin.ContextMenuContainer"

  2. 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>
</cm:ContextMenuContainer>
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios18.0 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst18.0 is compatible.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows10.0.19041 is compatible.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0

    • No dependencies.
  • net8.0-android34.0

    • No dependencies.
  • net8.0-ios18.0

    • No dependencies.
  • net8.0-maccatalyst18.0

    • No dependencies.
  • net8.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
Version Downloads Last updated
1.0.8 1,016 4 months ago
1.0.7 1,558 5/14/2024
1.0.6 803 5/1/2024
1.0.5 416 3/22/2024
1.0.4 943 11/16/2023
1.0.3 802 11/14/2022
1.0.1 403 11/1/2022