Axiom.Overlays.OverlayElement.NotifyZOrder C# (CSharp) Method

NotifyZOrder() public method

Internal method to notify the element when Zorder of parent overlay has changed.
Overlays have explicit Z orders. OverlayElements do not, they inherit the ZOrder of the overlay, and the Zorder is incremented for every container nested within this to ensure that containers are displayed behind contained items. This method is used internally to notify the element of a change in final zorder which is used to render the element.
public NotifyZOrder ( int zOrder ) : int
zOrder int The z order.
return int
		public virtual int NotifyZOrder( int zOrder )
		{
			this.zOrder = zOrder;
			return this.zOrder + 1;
		}

Usage Example

        /// <summary>
        ///    Adds another OverlayElement to this container.
        /// </summary>
        /// <param name="element"></param>
        public virtual void AddChildImpl(OverlayElement element)
        {
            Debug.Assert(!children.ContainsKey(element.Name), string.Format("Child with name '{0}' already defined.", element.Name));

            // add to lookup table and list
            children.Add(element.Name, element);
            childList.Add(element);

            // inform this child about his/her parent and zorder
            element.NotifyParent(this, overlay);
            element.NotifyZOrder(zOrder + 1);
        }
All Usage Examples Of Axiom.Overlays.OverlayElement::NotifyZOrder