public LayerControl GetLayerControl(int index) { var item = ItemContainerGenerator.ContainerFromIndex(index); LayerControl lc = FindChild.FindVisualChild <LayerControl>(item, "layercontrol"); return(lc); }
/// <summary> /// LayerControl外层的AdornerDecorator /// </summary> /// <param name="index"></param> /// <returns></returns> public AdornerDecorator GetLayerControlAdornerDecorator(int index) { var item = ItemContainerGenerator.ContainerFromIndex(index); LayerControl lc = FindChild.FindVisualChild <LayerControl>(item, "layercontrol"); AdornerDecorator ad = VisualTreeHelper.GetParent(lc) as AdornerDecorator; return(ad); }