Here is the updated control sample for RC0.
Just a few changes from Beta 2 - RCO:
So porting was easy. If you want to play with this, definitely load it up in Blend and check out the great new VSM support as well. It make re-templating MUCH easier and I had some fun creating weird collapse effects (not included).
PingBack from http://housesfunnywallpaper.cn/?p=7913
Boyan Mihaylov on SL/Amazon, David Hyde with SL Stock Portfolio, Chris Anderson with SL LOB app, Jesse
Hi Shawn, thanks for your update. I created a custom control based on yours and it was fully functional under S2 Beta 2. Unfortunately with RC0 I'm facing one problem.... Is there any way to animate the Height prop of the contentgrid instead of using a rendertransform? The problem is, that I'd like to animate this prop between values Auto (expanded content) to 0 (collapsed content)... Blend claims it is not possible to animate auto generated values. In Beta 2, I used a little workaround to handle this by defining the Storyboard as the layoutRoot grid resource and dynamically setting the Height value in code, after the content was bound and I could evaluate the room it takes. RC0 comes with some changes in VSM syntax/usage and it seems it breaks my bypass :)
Thanks a lot.
@Igor - getting these sorts of things is pretty tough. I wanted to do this for this control but basically gave up on it and switched to the transform. There might be some way to push your own transition using the APIs off of VisualStateManager. One option (hold on to your hat) is to write a control that implements Measure/Arrange based on it's children, then reports that sized value as it's Height. This would be a container/content control that you'd put your content in and then bind to it's Height property. Worth trying - but no idea if it'll work or have other side-effects...
Shawn, as I can see we've come across similar issues and ideas how to handle them. :) I've played a bit with such custom panel but with no desired output so far. I've managed to work things out in Beta 2 with this little named static resource trick. I've also implemented your approach in my custom control with success (working on RC0), although it's not the kind of effect I'm looking for, as I've incorporated your control idea and have created a HeaderedItemsControl (HIC), which contains a header and collapsible list of items. Moreover, I've created a list of these controls, which is the main reason why I can't use your RenderTransform approach. I need all HICs in the list below the selected one to move up/down as I expand/collapse the selected HIC accordingly. The layout is not affected when playing with render transformation, as far as I know...that's why I need to play with the panel height instead. Result for me? : I'll probably play with the custom panel a bit more. BTW Have you some best practices or samples of custom panels overriding Measure/Arrange methods available? Thanks a lot
I'm having the same issues. Still no luck?
David has written about some of this stuff at his blog:
Thank you for pointing out the reference to David's LayoutTransform project. It looks it may provide me with solution to my issues. I'll definitely take a closer look at the project and will also play a bit with that custom Panel in advance ... just to see what can we do about it. If something interesting comes out, I'll let you guys know about it.