DataGrid dgrid = (DataGrid)LogicalTreeHelper.FindLogicalNode(StudentInformation, "StudentGrid");
查找对象DataGrid
Style style = (Style)this.FindResource("ContextMenu");
查找资源ContextMenu