Ejemplo n.º 1
0
        private static void sendFront(FrameworkElement element, ElementGroup group)
        {
            group.Elements.Remove(element);
            group.Elements.AddFirst(element);

            applyZOrdering(group);
        }
Ejemplo n.º 2
0
        internal static void Attach(FrameworkElement element, ElementGroup group)
        {
            group.Elements.AddFirst(element);
            element.MouseDown += (sender, args) => sendFront(element, group);

            applyZOrdering(group);
        }
Ejemplo n.º 3
0
        private static void applyZOrdering(ElementGroup group)
        {
            var currentIndex = 0;

            foreach (var element in group.Elements)
            {
                --currentIndex;
                Panel.SetZIndex(element, currentIndex);
            }
        }