Grid with ContextMenu : ContextMenu « Windows Presentation Foundation « C# / CSharp Tutorial






<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
<Grid Background="Transparent">
  <Grid.ContextMenu>
    <ContextMenu>
      <MenuItem Header="Foo" />
      <MenuItem Header="Bar" />
    </ContextMenu>
  </Grid.ContextMenu>


</Grid>
</Page>
WPF Grid With Context Menu








24.36.ContextMenu
24.36.1.Adding ContextMenu to TextBlockAdding ContextMenu to TextBlock
24.36.2.Grid with ContextMenuGrid with ContextMenu
24.36.3.Display a Context Menu with OpacityDisplay a Context Menu with Opacity