I have a UserControl with a button inside it. The UserControl its DataContext is one of my models so I can bind to it. However, for the button I want to be able to call a method from my viewmodel. The DataContext of the ListBox is this ViewModel.

Because my ContextMenu also needs the same DataContext I've bound them like this:

```
Command="{Binding Path=DataContext.AttendEventCommand, ElementName=EventListBox}"

```

Calling the EventListBox element and using its DataContext to call the AttendEventCommand. However I would like to call the AttendEventCommand from a button on the UserControl. I tried doing it the same way but sadly it doesn't work.

My data context is set like this:

```
DataContext="{Binding Path=EventList, Source={StaticResource Locator}}

```

My listbox code:

```
<ListBox x:Name="EventListBox" ItemsSource="{Binding Occurrences}" Margin="0,50,0,0" >
    <ListBox.ItemTemplate>
                        <DataTemplate>
                            <Grid>
                                <uctl:EventListItem HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Width="auto" Height="auto">
                                    <toolkit:ContextMenuService.ContextMenu>
                                        <toolkit:ContextMenu IsZoomEnabled="True" x:Name="ContextMenu">
                                            <toolkit:MenuItem x:Name="Going" Header="{Binding AttendingText}" Command="{Binding Path=DataContext.AttendEventCommand, ElementName=EventListBox}" CommandParameter="{Binding}"/>
                                        </toolkit:ContextMenu>
                                    </toolkit:ContextMenuService.ContextMenu>
                                </uctl:EventListItem>
                            </Grid>
                        </DataTemplate>
                    </ListBox.ItemTemplate>
</ListBox>

```

And my UserControl's button:

```
<Button Grid.RowSpan="3" Grid.Column="5" Opacity="0" Command="{Binding Path=DataContext.AttendEventCommand, ElementName=EventListBox}" CommandParameter="{Binding}"/>

```