locked
WinRT custom transitions

    Question

  • Hi,

    I'm wondering if it's possible to create a custom transition instead of using the the standard set of transitions.

    Especially I'd like to have a customized AddDeleteTransition when replacing a ListViewItem.

    I think I have to inherit from the Transition class (http://msdn.microsoft.com/en-us/library/windows/apps/windows.ui.xaml.media.animation.transition.ASPx) but I have no clue what to to in this class, as I can't find any samples. (I know how to create and use Storyboards and Animations)

    In the end, I want to to something like this in xaml:

    <ItemsControl.ItemContainerTransitions>
            <TransitionCollection>
                <mynamespace:MyCustomAddDeleteTransition/>
            </TransitionCollection>
    </ItemsControl.ItemContainerTransitions>

    Is something like this possible?

    Thanks in advance

    Tuesday, July 29, 2014 4:14 PM

Answers

  • Hi,

    As far as I know, the custom transition like that cannot used in windows store app. You can use the standard set of transitions. Or you can define a custom ItemsControl which derived from ItemsControl. In the custom ItemsControl ClearContainerForItemOverride and PrepareContainerForItemOverride event you can create Storyboard animations.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Wednesday, July 30, 2014 3:13 AM
  • Thanks, it's working fine for PrepareContainerForItemOverride (a FlipIn Animation). But the animation fired in ClearContainerForItemOverride (FlipOut) will not play/finish, as the PrepareContainerForItemOverride for the same container is called just after, even when i put the base class call for clearing in the finished event of the Storyboard. So for now I will keep the standard transition. Maybe with an future update for WinRT we are able to create custom transitions ;)
    Wednesday, July 30, 2014 6:28 AM

All replies

  • Hi,

    As far as I know, the custom transition like that cannot used in windows store app. You can use the standard set of transitions. Or you can define a custom ItemsControl which derived from ItemsControl. In the custom ItemsControl ClearContainerForItemOverride and PrepareContainerForItemOverride event you can create Storyboard animations.

    Best Wishes!


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Wednesday, July 30, 2014 3:13 AM
  • Thanks, it's working fine for PrepareContainerForItemOverride (a FlipIn Animation). But the animation fired in ClearContainerForItemOverride (FlipOut) will not play/finish, as the PrepareContainerForItemOverride for the same container is called just after, even when i put the base class call for clearing in the finished event of the Storyboard. So for now I will keep the standard transition. Maybe with an future update for WinRT we are able to create custom transitions ;)
    Wednesday, July 30, 2014 6:28 AM