Problems using TransitionControl with RadWindow

6 posts, 0 answers
  1. Weverton
    Weverton avatar
    12 posts
    Member since:
    May 2009

    Posted 10 Jan 2011 Link to this post

    Hi,

    I have created a ControlTemplate like this:

    <ControlTemplate x:Key="RadWindowTemplate" TargetType="Controls:RadWindow">
            <telerik:RadTransitionControl Content="{TemplateBinding Content}" >
                <telerik:RadTransitionControl.Transition>
                    <telerikTransition:FadeTransition/>
                </telerik:RadTransitionControl.Transition>
            </telerik:RadTransitionControl>
    </ControlTemplate>

    When I create a new RadWindow and set its Template property to template above, the window becames borderless, it means, it loses its header and buttons.

    Am I doing this by the right way??

    Thanks
  2. Pana
    Admin
    Pana avatar
    748 posts

    Posted 13 Jan 2011 Link to this post

    Hello Weverton,

    I believe you want to use the RadTransitionControl to create animation for the RadWindow when it shows or hide. You can not use the RadTransitionControl for that purpose. Are you trying to make the window use fade animation instead of the default zoom?

    Best wishes,
    Pana
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Weverton
    Weverton avatar
    12 posts
    Member since:
    May 2009

    Posted 13 Jan 2011 Link to this post

    Hi,

    Really, I want to animate the change of the content of the RadWindow (e.g.: my RadWindow has a RadGrid. When I double click a record, I change the RadWindow's content to show the details of the record). Otherwise, I have already put a ContentControl as the RadWindow content e change the TransitionControl's binding to this ContentControl. Like this, all works fine.

    Thanks,
  5. Pana
    Admin
    Pana avatar
    748 posts

    Posted 14 Jan 2011 Link to this post

    Hi Weverton,

    Ah, I am glad you have figured it out. If you want to animate the change of content in the window it is enough indeed to put RadTransitionControl as Content of the RadWindow and instead of setting the Content of the RadWindow you can set the Content of the RadTransitionControl.

    You can use the RadWindow's Template property to change its ContentTemplate but in that case you will have to include the default ContentTemplate (which is a lot of xaml and it is missing in the code you have posted) and replace the ContentPresenter within with the RadTransitionControl.

    All the best,
    Pana
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Garry
    Garry avatar
    205 posts
    Member since:
    Nov 2010

    Posted 19 Sep 2011 Link to this post

    Pana,
    So there is not away to apply transitions to the RadWindow Show/Hide events using the RadTransistion control then? I was hoping you were going to make it simple on me. :)
    If this has changed in a newer version care to elighten me on how to apply this feature to a RadWindow?

    Thanks,
    Garry
  7. Miroslav Nedyalkov
    Admin
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 22 Sep 2011 Link to this post

    Hello Garry,

     The TransitionControl is meant to provide visual effects when its content is changes and not to trigger some animations for showing/hiding something. In order to customize the Show/Hide animations of the RadWindow control you need to change the AnimationManager.AnimationSelector attached property of the RadWindow control. Its animations are called Show and Hide and this could be achieved in a way, similar to the one it is explained in this article about menu animations. Another approach could be to set the AnimationSelector to be null and add animations with Storyboards like described here. Please notice that as this article is pretty old you shouldn't use the Opened event, but the Loaded event of the RadWindow control to run the open animation.

    Hope this helps.

    Regards,
    Miroslav Nedyalkov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner