in Uncategorized

WPF: Panels Finally Get a ZIndex Attached Property

Karsten let us in on one of apparently only a few API changes in WPF Beta 2: the ZIndex attached property for Panels. A lot of people have been clammoring for this feature since day one. It used to be that the order of the child elements inside of the Children collection dictacted the ZIndexing, so if you wanted to raise one element in front of another you had to manipulate the collection which kind of sucked because that requires code-behind logic as opposed to just being able to use a property setter in a trigger. Well, not anymore. 😉

Update 10PM:

Originally I thought only Canvas supported this new property, but thanks to this post from Tim Sneath I found out it’s applicable to all Panel types that support layering. Tim also mentions changes to Slider and Scrollbar, further refinement of XAML syntax and changes to WinForms integration components.

Leave a comment


  • Related Content by Tag