Skip to content

Instantly share code, notes, and snippets.

@julesx
Created June 2, 2015 15:32
Show Gist options
  • Save julesx/c2e7e3a3177766deb33e to your computer and use it in GitHub Desktop.
Save julesx/c2e7e3a3177766deb33e to your computer and use it in GitHub Desktop.
<Button Tag="{Binding RelativeSource={RelativeSource AncestorType=Grid}, Path=DataContext}"
CommandParameter="{Binding}"
Command="{Binding RelativeSource={RelativeSource AncestorType=Grid}, Path=DataContext.CmdPlayMeAtBookmark}" Margin="5,0,0,0" Style="{DynamicResource HyperlinkButton}"
Content="{Binding Seconds, Converter={StaticResource SecondsConverter}}">
<Button.ContextMenu>
<ContextMenu Tag="{Binding}" DataContext="{Binding Path=PlacementTarget.(Button.Tag), RelativeSource={RelativeSource Self}}">
<MenuItem Header="Delete" CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=ContextMenu}, Path=PlacementTarget.CommandParameter}" Command="{Binding CmdDeleteBookmark}" />
</ContextMenu>
</Button.ContextMenu>
</Button>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment