title: WPF: How to Assign data to the DataContext of a Control that is Located in Windows.Resources?
body: <p>I have a DataGrid inside a Canvas. A List of data is assigned to the DataContext of the DataGrid in code behind. Now I am trying to move the Canvas to Windows.Resources in order to create multiple instances from the control when needed. However, when moving the Canvas to resources, it is not recognized anymore from Code Behind. Any idea how to solve this issue?</p>