This is a migrated thread and some comments may be shown as answers.

Problems using TransitionControl with RadWindow

5 Answers 81 Views
TransitionControl
This is a migrated thread and some comments may be shown as answers.
Weverton
Top achievements
Rank 1
Weverton asked on 10 Jan 2011, 09:32 PM
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

5 Answers, 1 is accepted

Sort by
0
Pana
Telerik team
answered on 13 Jan 2011, 04:41 PM
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>>
0
Weverton
Top achievements
Rank 1
answered on 13 Jan 2011, 05:24 PM
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,
0
Pana
Telerik team
answered on 14 Jan 2011, 07:18 AM
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>>
0
Garry
Top achievements
Rank 1
answered on 20 Sep 2011, 03:48 AM
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
0
Miroslav Nedyalkov
Telerik team
answered on 22 Sep 2011, 08:28 AM
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 >>

Tags
TransitionControl
Asked by
Weverton
Top achievements
Rank 1
Answers by
Pana
Telerik team
Weverton
Top achievements
Rank 1
Garry
Top achievements
Rank 1
Miroslav Nedyalkov
Telerik team
Share this question
or