xaml - scale transform element outside user control ?

Posted on 2009-02-16
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.

Question by:bswiftly
    LVL 9

    Expert Comment

    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. 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);

    LVL 1

    Accepted Solution

    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.
    LVL 9

    Expert Comment

    you solved it in 2006?
    Or you found someone else's solution

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    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.…
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    732 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

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now