Relative Content

Tag Archive for c#wpfdatagriddatacontext

How to set a different DataContext for a WPF datagrid column?

I’m using a DataGrid in my .NET 8 WPF app. The datagrid is set to a data context from a third-party library. I’d like to add a button column (as a DatagridTemplateColumn) to call a function in my own view model. I can’t seem to figure out how to make this work.