{"id":13711154,"url":"https://github.com/AndreiMisiukevich/ContextMenu","last_synced_at":"2025-05-06T20:32:26.733Z","repository":{"id":45614686,"uuid":"135506012","full_name":"AndreiMisiukevich/ContextMenu","owner":"AndreiMisiukevich","description":"ContextView for Xamarin.Forms","archived":false,"fork":false,"pushed_at":"2023-02-21T06:19:03.000Z","size":25847,"stargazers_count":275,"open_issues_count":0,"forks_count":42,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-09T18:41:56.248Z","etag":null,"topics":["context-actions","context-menu","xamarin","xamarin-forms"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AndreiMisiukevich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-30T23:02:59.000Z","updated_at":"2024-10-12T21:44:19.000Z","dependencies_parsed_at":"2024-06-19T01:56:52.882Z","dependency_job_id":null,"html_url":"https://github.com/AndreiMisiukevich/ContextMenu","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiMisiukevich%2FContextMenu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiMisiukevich%2FContextMenu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiMisiukevich%2FContextMenu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AndreiMisiukevich%2FContextMenu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AndreiMisiukevich","download_url":"https://codeload.github.com/AndreiMisiukevich/ContextMenu/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224443945,"owners_count":17312127,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["context-actions","context-menu","xamarin","xamarin-forms"],"created_at":"2024-08-02T23:01:05.083Z","updated_at":"2024-11-13T21:31:39.431Z","avatar_url":"https://github.com/AndreiMisiukevich.png","language":"C#","funding_links":[],"categories":["UI"],"sub_categories":[],"readme":"## GIF\n\u003chtml\u003e\n  \u003ctable style=\"width:100%\"\u003e\n    \u003ctr\u003e\n      \u003cth\u003eSideContextMenuView\u003c/th\u003e\n      \u003cth\u003eSwipeActionContextMenuView (Move to delete)\u003c/th\u003e \n      \u003cth\u003eSwipeActionContextMenuView (Autoclosing)\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n      \u003ctd\u003e\u003cimg src=\"https://github.com/AndreiMisiukevich/ContextMenu/blob/master/files/1.gif?raw=true\"\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://github.com/AndreiMisiukevich/ContextMenu/blob/master/files/2.gif?raw=true\"\u003e\u003c/td\u003e\n      \u003ctd\u003e\u003cimg src=\"https://github.com/AndreiMisiukevich/ContextMenu/blob/master/files/3.gif?raw=true\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n  \u003c/table\u003e\n\u003c/html\u003e\n\n## Setup\n* Available on NuGet: [ContextViewCell](http://www.nuget.org/packages/ContextViewCell) [![NuGet](https://img.shields.io/nuget/v/ContextViewCell.svg?label=NuGet)](https://www.nuget.org/packages/ContextViewCell)\n* Add nuget package to your Xamarin.Forms .netStandard/PCL project and to your platform-specific projects (iOS and Android)\n* Call ```ContextMenuViewRenderer.Preserve()``` in AppDelagate for **iOS** and MainActivity for **Android**\n\n|Platform|Version|\n| ------------------- | ------------------- |\n|Xamarin.iOS|8.0+|\n|Xamarin.Android|15+|\n\n\n## Samples\n\nAll samples are here: https://github.com/AndreiMisiukevich/ContextMenu/tree/master/ContextMenuSample/ContextMenuSample/Pages\n\nCollection view is supported!\n**XAML:**\n```xml\n\u003cCollectionView x:Name=\"CollectionView\"\n                    ItemsSource=\"{Binding Items}\"\n                    Margin=\"0, 5, 0, 0\"\n                    BackgroundColor=\"White\"\u003e\n        \u003cCollectionView.ItemTemplate\u003e\n            \u003cDataTemplate\u003e\n                \u003ccontext:SideContextMenuView IsAutoCloseEnabled=\"true\"\u003e\n                        \u003ccontext:SideContextMenuView.View\u003e\n                            \u003cFrame BackgroundColor=\"#512DA8\"\n                                   Margin=\"15,5\"\n                                   Padding=\"20\"\n                                   WidthRequest=\"{Binding Source={x:Reference CollectionView}, Path=Width, Converter={StaticResource MenuFitWidthConverter}, ConverterParameter='70'}\"\n                                   CornerRadius=\"10\"\u003e\n                                \u003cStackLayout Orientation=\"Horizontal\" \n                                             HorizontalOptions=\"FillAndExpand\"\n                                                                                Opacity=\"{Binding IsMuted, Converter={StaticResource IsMutedToOpacityConverter}}\"\n                                             Spacing=\"10\"\u003e\n                                    \u003cFrame HeightRequest=\"80\"\n                                           WidthRequest=\"80\"\n                                           CornerRadius=\"40\"\n                                           Padding=\"0\"\n                                           VerticalOptions=\"CenterAndExpand\"\n                                           IsClippedToBounds=\"true\"\u003e\n                                        \u003cImage Source=\"{Binding AvatarUrl}\" \n                                               Aspect=\"AspectFill\"/\u003e\n                                    \u003c/Frame\u003e\n                                    \u003cStackLayout VerticalOptions=\"CenterAndExpand\"\n                                                 HorizontalOptions=\"CenterAndExpand\"\n                                                 Spacing=\"0\"\u003e\n                                        \u003cLabel Text=\"Chat with:\"\n                                               FontAttributes=\"Bold\"\n                                               TextColor=\"White\"/\u003e\n                                        \u003cLabel Text=\"{Binding Name}\" \n                                               FontSize=\"Large\"\n                                               TextColor=\"White\"/\u003e\n                                    \u003c/StackLayout\u003e\n                                \u003c/StackLayout\u003e                             \n                            \u003c/Frame\u003e\n                        \u003c/context:SideContextMenuView.View\u003e\n                        \u003ccontext:SideContextMenuView.ContextTemplate\u003e\n                            \u003cDataTemplate\u003e\n                                \u003cFrame Margin=\"0, 5\"\n                                       Padding=\"0\"\n                                       CornerRadius=\"10\"\n                                       IsClippedToBounds=\"true\"\n                                       BackgroundColor=\"Gold\"\u003e\n                                    \u003cStackLayout \n                                             Padding=\"10, 5\"\n                                             Orientation=\"Horizontal\"\n                                             Spacing=\"10\"\n                                             Margin=\"0, 5\"\u003e\n                                        \u003cImageButton Source=\"trash.png\" HeightRequest=\"60\" WidthRequest=\"60\" VerticalOptions=\"CenterAndExpand\" HorizontalOptions=\"EndAndExpand\" \n                                                     Command=\"{Binding BindingContext.DeleteCommand, Source={x:Reference CollectionView}}\"\n                                                     CommandParameter=\"{Binding .}\"/\u003e\n                                        \u003cImageButton Source=\"mute.png\" HeightRequest=\"60\" WidthRequest=\"60\" VerticalOptions=\"CenterAndExpand\" HorizontalOptions=\"EndAndExpand\" \n                                                     Command=\"{Binding BindingContext.MuteCommand, Source={x:Reference CollectionView}}\"\n                                                     CommandParameter=\"{Binding .}\"/\u003e\n                                    \u003c/StackLayout\u003e\n                                \u003c/Frame\u003e\n                            \u003c/DataTemplate\u003e\n                        \u003c/context:SideContextMenuView.ContextTemplate\u003e  \n                    \u003c/context:SideContextMenuView\u003e\n            \u003c/DataTemplate\u003e\n        \u003c/CollectionView.ItemTemplate\u003e\n    \u003c/CollectionView\u003e\n```\n*Make sure your main view width equals list's width*\nYou can adjust it by binding\n\n```xml\n...\n\u003cCollectionView x:Name=\"Collection\"\n        \u003cCollectionView.ItemTemplate\u003e\n            \u003cDataTemplate\u003e\n                \u003ccontext:SideContextMenuView\u003e\n                    \u003ccontext:SideContextMenuView.View\u003e\n                        \u003cContentView WidthRequest=\"{Binding Source={x:Reference Collection}, Path=Width}\"\u003e\n                            ...\n```\n\n\nCheck source code for more info, or ***just ask me =)***\n\n## License\nThe MIT License (MIT) see [License file](LICENSE)\n\n## Contribution\nFeel free to create issues and PRs 😃\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndreiMisiukevich%2FContextMenu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAndreiMisiukevich%2FContextMenu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAndreiMisiukevich%2FContextMenu/lists"}