摘要: 1、获取父控件调用方法:GridlayoutGrid=VTHelper.GetParentObject(this.spDemoPanel,"LayoutRoot"); 1 public T GetParentObject(DependencyObject obj, string name) where T : FrameworkElement 2 { 3 DependencyObject parent = VisualTreeHelper.GetParent(obj); 4 while (parent != null) 5 { 6 if (parent ... 阅读全文
posted @ 2013-08-02 23:24 夜曲984 阅读(9716) 评论(0) 推荐(1) 编辑