VsixCommunity / Community.VisualStudio.Toolkit

Making it easier to write Visual Studio extensions
Other
256 stars 44 forks source link

How does the Vsix extension prevent Visual Studio from capturing keyboard events #448

Open weiyoucheng opened 1 year ago

weiyoucheng commented 1 year ago

My plugin has a user control in a window, which includes a DataGrid control. I added the PreviewKeyDown event to the DataGrid control. When I pressed the Esc key while editing a DataGrid cell, the DataGrid.PreviewKeyDown event did not capture any event information, but was captured by Visual Studio. How to prevent Visual Studio from capturing keyboard events so that the DataGrid.PreviewKeyDown event can be captured