question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ContextMenu not open on click between grid controls

See original GitHub issue
    <Grid RowDefinitions="*,Auto" Margin="10" Width="150" Height="300">
      <TextBlock Grid.Row="0" Text="First text"/>
      <TextBlock Grid.Row="1" Text="Second text"/>
      <Grid.ContextMenu>
        <ContextMenu>
          <MenuItem Header="MenuHeader"/>
        </ContextMenu>
      </Grid.ContextMenu>
    </Grid>

When click on TextBlock - menu opened When click on free space between controls - menu not opened

Test on 0.8.1-cibuild0003134-beta

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
jp2masacommented, Jul 7, 2019

Try setting <Grid Background="Transparent" ..., I think that the Background is null by default, so hit test ignores it.

0reactions
MonkAlexcommented, Jul 26, 2019

@grokys thanks.

Because Background =" Transparent " helps, I close the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Controls outside context menu does not get hit on a single ...
This is happening because the first click removes the focus from the context menu which is open. Handling the preview mouse down event...
Read more >
Context menu not appearing on MouseDown
GridControl does not show any predefined menus for rows or cells. Only an active editor can show a context menu by right-clicking its...
Read more >
How to: Handle the ContextMenuOpening Event - WPF . ...
The general technique is to get the source of the event, which is the specific control that was right-clicked, and get the ContextMenu...
Read more >
Context menus and the grid control | Infragistics Forums
The problem with adding the context menu to the control is that I don't know how to then offer difrent menu options depending...
Read more >
Open context menu in grid on button click
Is it possible to open a context menu, fire the OnRowContextMenu event, in a grid using a button click in a row?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found