I need to bring to front a custom control in WPF.
pseudoCode
OnMouseDown()
{
if (this.parent != null)
this.parent.BringToFront(this);
}
I know, I know that there are a ZIndex, but still don't understand how to replace the simple WinForm BringToFront
to parent.SetZIndex(this, ?MaxZIndex(parent)? + 1)
?
Perhaps there is a better way of doing it in the such a cool thing like WPF?!..
See Question&Answers more detail:os