How to stop the transition for the Navigation continer first time load

4 posts, 0 answers
  1. willson
    willson avatar
    8 posts
    Member since:
    Jul 2010

    Posted 27 Jul 2010 Link to this post

    Hello Telerik,    
        I use the RadTransitionControl for my Navigation frame. 
        The function I want is when the first time load the sub page in Navigation frame the RadTransitionControl will not play the animation which just as your demo shows.
        And then when I click something or navigate to other sub pages the RadTransitionControl play the animation. 
        Could you show me how to accomplish this?
    Thanks
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 29 Jul 2010 Link to this post

    Hello Willson,

    I suppose your navigation frame is empty until something load up. Then the RadTransitionControl play animation that swaps the empty page with the new loaded page. You can try setting the Transition of the RadTransitionControl to Null while loading the first page and when it is loaded you can set the real Transition on the RadTransitionControl. This way the animation will be disabled during the initial loading.

    Best wishes,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. DevCraft banner
  4. willson
    willson avatar
    8 posts
    Member since:
    Jul 2010

    Posted 30 Jul 2010 Link to this post

    Hi Telerik
            I use the silverlight business template. Here is the code of Navigation frame
    <navigation:Frame x:Name="ContentFrame" Style="{StaticResource ContentFrameStyle}" 
                                  Source="/Home" Navigated="ContentFrame_Navigated" 
                                  NavigationFailed="ContentFrame_NavigationFailed"
                                  s:Authorization.NavigationMode="Redirect">
                    <navigation:Frame.UriMapper>
                        <uriMapper:UriMapper>
                            <uriMapper:UriMapping Uri="" MappedUri="/Views/Home.xaml"/>
                            <uriMapper:UriMapping Uri="/{pageName}" MappedUri="/Views/{pageName}.xaml"/>
                        </uriMapper:UriMapper>
                    </navigation:Frame.UriMapper>
                </navigation:Frame>
           And here is the code of style
    <Style x:Key="ContentFrameStyle" TargetType="navigation:Frame">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="navigation:Frame">
                        <telerik:RadTransitionControl Content="{TemplateBinding Content}"
                                           ContentTemplate="{TemplateBinding ContentTemplate}">
                            <telerik:RadTransitionControl.Transition>
                                <telerik:SlideAndZoomTransition />  
                            </telerik:RadTransitionControl.Transition>
                        </telerik:RadTransitionControl>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

            If I want the navigation frame is not empty when it is loaded or using the code to set the transition animation.What should I do?
    Thanks
  5. Pana
    Admin
    Pana avatar
    748 posts

    Posted 05 Aug 2010 Link to this post

    Hi Willson,

    I have created an example that has the RadTransitionControl's Duration set to 0:0:0 initially and when the control is loaded a dispatcher sets the animation Duration to 0:0:1. You can find the Frame template and the callback method in the attached project.

    Greetings,
    Panayot
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top