We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now


xaml - scale transform element outside user control ?

Medium Priority
Last Modified: 2013-11-12
I have a page with two user controls.   These need to remain user controls.. I'll call the user control on the "Left" the "Left" user control haha.. and the rgiht one the right one...

The Left user control is a navigation user control and what i want is to be able to have an element overlap the right user control for a particular selected item.    

I have done this with a bound listbox - and textblocks for the items, inside a grid with a polygon behind the textbox to colour it and draw a shape of an arrow.   What I want is to be able to show the arrow head on top of the right user control for the selected one.  (All data triggers etc work fine, its just that it won't show on top of the other control when I do a Scale Transform on the polygon.

When I use Snoop.. it shows that the polygon has stretched across, but I am thinking because the way I did it - the arrow isn't stretching across.  

I've also tried zIndex and hasn't worked for me.   If someone has some sample code I'd love to see.

Watch Question

yourcontrol.SetValue(Canvas.ZIndexProperty, x);

where yourcontrol is the UserControl you want to set the z-index property for, and x is what you want to set it to.

...you can also set this for the polygon, but I assume it will effect its arrangement within the UserControl it is part of, rather than in relation to the other usercontrol:

yourpolygon.SetValue(Canvas.ZIndexProperty, x);

Well I actually solved this.    ZIndex would not solve the problem.

ClipToBounds = False needs to be set.    This property will propagate to all its children in the visual tree until something explicitly overrides it.

I also had a problem with where the ListBox will not obey ClipToBounds=False, so you have to subclass ListBox and add some styling.

See the following link for my solution.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
you solved it in 2006?
Or you found someone else's solution
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.