Skip to content
 
 

Repository files navigation

SideActionBarCell | MoveToActionCell controls for Xamarin Forms

Setup

  • Available on NuGet: ContextViewCell NuGet
  • Add nuget package to your Xamarin.Forms .netStandard/PCL project and to your platform-specific projects (iOS and Android)
Platform Version
Xamarin.iOS 8.0+
Xamarin.Android 15+

SideActionBarCell

This plugin provides opportunity to create custom context menu for every cell

Sample GIF

MoveToActionCell

Also you can create move-to-action cells (for example Move to delete)

Sample GIF

Samples

The sample you can find here https://github.com/AndreiMisiukevich/ContextMenu/blob/master/ContextMenuSample/ContextMenuSample/SamplePage.xaml

XAML:

    <ListView>
        <ListView.ItemTemplate>
            <DataTemplate>
                <context:SideActionBarCell>
                    <context:SideActionBarCell.Content>
                        //{YOUR MAIN VIEW HERE}
                        </ContentView>
                    </context:SideActionBarCell.Content>
                    <context:SideActionBarCell.ContextTemplate>
                        <DataTemplate>
                            //{YOUR CONTEXT TEMPLATE HERE} you can use DataTemplateSelector too
                        </DataTemplate>
                    </context:SideActionBarCell.ContextTemplate>
                </context:SideActionBarCell>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>

Make sure your main view width equals list's width You can adjust it by binding

...
<ListView x:Name="SampleList"
        <ListView.ItemTemplate>
            <DataTemplate>
                <context:SideActionBarCell>
                    <context:SideActionBarCell.Content>
                        <ContentView WidthRequest="{Binding Source={x:Reference SampleList}, Path=Width}">
                            ...

C#:

The sample you can find here https://github.com/AndreiMisiukevich/ContextMenu/blob/master/ContextMenuSample/ContextMenuSample

Check source code for more info, or 🇧🇾 just ask me =) 🇧🇾

License

The MIT License (MIT) see License file

Contribution

Feel free to create issues and PRs 😃

About

ContextViewCell for Xamarin.Forms

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages