Jon Erickson
Jon Erickson

Reputation: 114836

How to detect mouse double click events when a WPF DataGridCell is disabled?

When we are disabling (IsEnabled="False") a DataGridCell it ceases to raise the Mouse Double Click event. We want to still be able to tap into the double click event to do something when the cell is double click (on both disabled and enabled states).

How do we do that?

Upvotes: 2

Views: 1285

Answers (1)

Mark Hall
Mark Hall

Reputation: 54532

Disabling the DataGridCell will disable all Mouse and Keyboard Events for that Cell. If you still need to respond to Mouse/Keyboard events try setting the IsReadOnly Property.

From First Link:

Elements that are not enabled do not participate in hit testing or focus and therefore will not be sources of input events.

Upvotes: 3

Related Questions