One way you can achieve this is through the following:
Lets call your first window, the one that contains the grid “GridWindow”.
Create a new window and name it “ChartWindow”.
Create a Constructor that takes as parameter a"KeyValuePair" collection in ChartWindow.
Subscribe to the PreviewMouseDown event of the DataCell in GridWindow. This canbe done through styles and event setters. Here's an example:
In the handler, Extract the object that represents the clicked cell, create anew ChartWindow class and send the KeyValue collection property of thatobject through the constructor. Here's an example:
private voidDataCellPreviewMouseDownHandler(object sender, RoutedEventArgs e)
Xceed.Wpf.DataGrid.DataCell cell= sender as Xceed.Wpf.DataGrid.DataCell;
NewWindow window = newNewWindow(((YourType)cell.DataContext).YourKeyValueCollection);
In the constructor of ChartWindow, set the properties of yourchart as needed from the YourKeyValueCollection that is sent as parameter.
Don’t forget to call InitializeComponent in your constructor.
I hope this was clear and answers your question.
Xceed Software inc.