WPF后台操作前台元素之查找对象

DataGrid dgrid = (DataGrid)LogicalTreeHelper.FindLogicalNode(StudentInformation, "StudentGrid");

查找对象DataGrid

Style style = (Style)this.FindResource("ContextMenu");

查找资源ContextMenu

posted @ 2016-04-12 10:37  昨天梦想  阅读(597)  评论(0编辑  收藏  举报