private static void SetLayerZOrder(Adorner adorner, int index) { AdornerData data = adorner.GetAdornerData(); if (data.ParentLayer != null && data.ParentLayer.Equals(adorner.Parent)) { setZOrderMethodInfo.Invoke(data.ParentLayer, new object[] { adorner, index }); } }
public static void SetAdornerIndex(this Adorner adorner, int index) { AdornerData data = adorner.GetAdornerData(); if (data != null && data.ParentLayer != null) { data.ZIndex = index; SetLayerZOrder(adorner, index); } }