I know this question has been answered before but looking at most of them, they use code behind and I am under the understanding that is never ok in MVVM, also others use MVVM pattern. I refuse to use a pattern as I want to learn from the ground up. I am able to bind the ItemsSource correctly but how do I bind to the datagrid headers and such.
I would think this is common but what I want is to be able to have a "table" of data with headers. I want the user to be able to right click in the header row and toggle columns off and on. That part I am not as worried about figuring out how to do.
I am asking how to have a datagrid with dynamic columns/headers without codebehind or a framework. I am not sure how to bind from the viewmodel to a datagrid.