private void Properties_Click(object sender, EventArgs e) { char UniqueChar = Conversions.intToChar(Grid.GetRow(panel)); int UniqueInt = Grid.GetColumn(panel); ContextProperties myProp = new ContextProperties(ovenName, UniqueChar, UniqueInt); myProp.Show(); }
private void DataGridCell_MouseDown(object sender, MouseButtonEventArgs e) { MouseEventArgs me = e as MouseEventArgs; if (me.RightButton == MouseButtonState.Pressed) { DataGridCell temp = sender as DataGridCell; DataGridRow dataRow = DataGridRow.GetRowContainingElement(temp); int index = dataRow.GetIndex(); DataGridCellInfo myInfo = new DataGridCellInfo(SearchBody.Items[index], SearchBody.Columns[0]); SearchElements tempEle = myInfo.Item as SearchElements; char row = tempEle.row; int column = tempEle.column; string ovenName = tempEle.ovenName; ContextProperties newProperties = new ContextProperties(ovenName, row, column); newProperties.Show(); } }