I dont know if it planned in v1 wpf/e, but you can layer UI currently using TranslateTransform eg: http://msdn2.microsoft.com/en-us/library/ms742305.aspx
Or it can be done currently by doing via css http://mtaulty.com/CommunityServer/blogs/mike_taultys_blog/archive/2006/12/15/9035.aspx
Correct. The CTP does not include any z-index property support. The z-order of elements is based upon the order that they are in the parent's visual collection. You can remove and add an element to make it be at the top of the z-order. We will be adding a z-index property in the future.
-mark
Program Manager
Microsoft
This post is provided "as-is"
Thanks for the links. Let me give a few more details on what I'm trying to do.
I'm trying to layer two rectangles that are dynamically drawn and are placed in a 3D type view. The back rectangle shouldn't overlap the close rectangle. I'm sure the order of the rectangles in the xaml changes things but I don't have control over the order that they're drawn out since they're all dynamic and based upon a sort order.
If there's a way to z-index the closer rectangle so that it's always on top that would be perfect.
Thanks Mark.
Since my rectangles are in a 3-D view (I'm faking that with reflections) I need the close one to always be on top of the other one. It's not a huge issue right now and while I could potentially play with the order relative to the parent's visual collection, I'll just hold-off on changing anything until z-index makes it in there.
I don't control the order for this particular project I'm working on. The objects I'm writing out are sorted based upon two different proprties and written out in a 3D looking environment. So, I suppose it would be possible to change the order I create the XAML in based upon a radius calculation but at this point it's not worth the effort I don't think.
Having a Z-Index would greatly simplify things so I'm hoping that's in the plans for V1.
out of my experience, you have the ZIndex propery for <panel> element and grid element.
panel.ZIndex is intelisenced
grid.ZIndex is not, but works fine.
mugile
Is there any ETA on when a z-index property might make it into a CTP build? An example of why I need it is shown at the following URL (albums on the left side will overlap improperly due to not being able to set the z-index as they move).
http://www.xmlforasp.net/codebank/system_web_extensions/albumviewer/albumviewer.aspxBarring any issues, the next CTP after the Feb one will have the z-index feature.
-mark
Program Manager
Microsoft
This post is provided "as-is"
myCanvas.children.insert(0, agControl.createFromXaml(xamlFragment));
Not that this addresses your exact issue, but others maybe interested.
Hi,
I simulated z-index using order of elements of the children collection.
That worked fine since first objects in the collection render fist, and stay behind of last elements the collection.
The problem come when I tried to change the layout dynamically. I thought removing and adding an element should place that element on top of all the others, but it didn't worked fine if I do it in the same event.
function
OnMouseDown(sender, eventArgs) {I have already tried usign wpfControl.reload() in the middle of both instructions.
Any idea why this is happening?
Right now I'm doing this implementing the remove on the mouseLeftButtonDown and the add on the mouseLeftButtonUp events (the effect is not exactly what i'm looking for).
Is there a way of doing it without handling two events?
thaks!