There is a DataGrid in which there are many columns, some of which are Visibility = Collapsed. How to add a context menu to column headers with a choice of columns. It is necessary, as in Windows Explorer: enter image description here

It is desirable that this functionality can be easily added to any DataGrid, for example through AttachedProperty.

    0