Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 77050

Can't get context menu working

$
0
0

Hi,

I can't seem to get my context MenuItems to fire either the edit or the delete commands indicated below. The menu comes up just fine, but nothing happens. Hopefully someone can help me out.

Bindings to my viewmodel are otherwise working fine.

<ListView ItemsSource="{Binding Encounters}">
        <ListView.ItemTemplate>
          <DataTemplate>
            <ViewCell>
              <ViewCell.ContextActions>
                <MenuItem Text="Edit" Command="{Binding EditEncounterCommand}" CommandParameter="{Binding .}" />
                <MenuItem Text="Delete" Command="{Binding DeleteEncounterCommand}" CommandParameter="{Binding .}" IsDestructive="True" />
              </ViewCell.ContextActions>
              <ViewCell.View>
                <StackLayout Orientation="Horizontal">
                  <Label Text="{Binding Patient.GivenNames}" />
                  <Label Text="{Binding Patient.LastName}" />
                </StackLayout>
              </ViewCell.View>
            </ViewCell>
          </DataTemplate>
        </ListView.ItemTemplate>
      </ListView>

Viewing all articles
Browse latest Browse all 77050

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>