MoveToFront() public method

Change the order of this node in its parent's children list so that it will draw in front of all of its other sibling nodes.
public MoveToFront ( ) : void
return void
示例#1
0
			protected override void OnStartDrag(object sender, PInputEventArgs e) {
				base.OnStartDrag (sender, e);
				draggedNode = e.PickedNode;
				draggedNode.MoveToFront();
				nodeStartPosition = draggedNode.Offset;
			}
示例#2
0
		/// <summary>
		/// Hilite the specified slide - or unhilite all slides if hiliteIndex is -1.
		/// </summary>
		private void HiliteSlide(int newHiliteIndex) {
			PNode newSlide = null;
			if (newHiliteIndex >= 0) {
				newSlide = slides[newHiliteIndex];
			}
			if (newSlide != hiliteSlide) {
				// First unhilite previously hilited slide
				if ((hiliteSlide != null) && (hiliteSlide != focusSlide)) {
					// If this slide is currently animating, then kill that animation
					int index = (int)hiliteSlide.Tag;
					if (slideActivities[index] != null) {
						slideActivities[index].Terminate();
						slideActivities[index] = null;
					}
					(hiliteSlide as PMultiSizeImage).ShowThumb = true;
					(hiliteSlide as PMultiSizeImage).Hilite = false;
					PTransformActivity activity = hiliteSlide.AnimateToMatrix(GetUnfocusedMatrix(hiliteSlide, (int)hiliteSlide.Tag), SLIDEBAR_ANIMATION_TIME_MILLIS);
					// Put the slide in order when the animation finishes
					activity.ActivityFinished = new ActivityFinishedDelegate(HiliteActivityFinished);
					hiliteSlide = null;
				}
				// Then hilite new slide (as long is it isn't the currently focused slide)
				if (newSlide != focusSlide) {
					hiliteSlide = newSlide;
					if (hiliteSlide != null) {
						PMatrix matrix = GetUnfocusedMatrix(hiliteSlide, (int)hiliteSlide.Tag);
						matrix.ScaleBy(1.3f, (hiliteSlide.Bounds.Width / 2), hiliteSlide.Bounds.Height);
						(hiliteSlide as PMultiSizeImage).Hilite = true;
						hiliteSlide.MoveToFront();
						currentPosition.MoveToFront();
						slideActivities[newHiliteIndex] = hiliteSlide.AnimateToMatrix(matrix, SLIDEBAR_ANIMATION_TIME_MILLIS);
					}
				}
			}
		}