Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

xaml - scale transform element outside user control ?

Posted on 2009-02-16
3
Medium Priority
?
1,589 Views
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.

Thanks.
0
Comment
Question by:bswiftly
  • 2
3 Comments
 
LVL 9

Expert Comment

by:peterdungan
ID: 23686456
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);

0
 
LVL 1

Accepted Solution

by:
bswiftly earned 0 total points
ID: 23686497
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.
http://blogs.msdn.com/jaimer/archive/2006/08/10/695101.aspx
0
 
LVL 9

Expert Comment

by:peterdungan
ID: 23721069
you solved it in 2006?
Or you found someone else's solution
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question