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

Preventing a ToolWindow from fading away when closing

2 Answers 32 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Pascal GUERY
Top achievements
Rank 1
Pascal GUERY asked on 13 Feb 2014, 03:19 PM
Hi everyone,

I am developing a WPF application at my company.
I use controls from RadControls For WPF Trial Version assemblies including the RadDocking control.
The StyleManager.ApplicationTheme property is set to an instance of SummerTheme.

When the user closes a floating Pane then the containing ToolWindow fades away and disappears as shown on the attached pictures 1.png to 3.png.
I want the ToolWindow to disappear without fading away.
What do I need to do ?

Thank you in advance for your help

2 Answers, 1 is accepted

Sort by
0
Accepted
Masha
Telerik team
answered on 18 Feb 2014, 09:34 AM
Hi Pascal,

I would suggest that you modify the AnimationManager.AnimationSelector of RadDocking control. Please refer to the following XAML that demonstrates how to do this:

<Window x:Class="RadDockingAnimation.MainWindow"
        xmlns:sys="clr-namespace:System;assembly=mscorlib"
        xmlns:telerikAnimation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <sys:TimeSpan x:Key="AutoHideInAnimationDuration">0:0:0.360</sys:TimeSpan>
        <sys:TimeSpan x:Key="AutoHideOutAnimationDuration">0:0:0.400</sys:TimeSpan>
    </Window.Resources>
     
    <Grid>
        <telerik:RadDocking  >
            <telerikAnimation:AnimationManager.AnimationSelector>
                <telerikAnimation:AnimationSelector>
                    <!-- ToolWindow, Compass, RootCompass and DragCue animations -->
                    <!--This code enables the animations.-->
                    <!--  <telerikAnimation:AnimationGroup AnimationName="Move">
                        <telerikAnimation:MoveAnimation />
                        <telerikAnimation:ResizeAnimation />
                        <telerikAnimation:FadeAnimation Direction="In" />
                        <telerikAnimation:ScaleAnimation Direction="In" MinScale="0.7"
                                MaxScale="1.0" TargetElementName="VisualRoot" />
                    </telerikAnimation:AnimationGroup>
  
                   <telerikAnimation:AnimationGroup AnimationName="Show">
                        <telerikAnimation:FadeAnimation Direction="In" />
                        <telerikAnimation:ScaleAnimation Direction="In" MinScale="0.95"
                                MaxScale="1.0" TargetElementName="VisualRoot" />
                    </telerikAnimation:AnimationGroup>
                    <telerikAnimation:AnimationGroup AnimationName="Hide" SpeedRatio="0.7">
                        <telerikAnimation:FadeAnimation Direction="Out" />
                        <telerikAnimation:ScaleAnimation Direction="Out" MinScale="0.7"
                                MaxScale="1.0" TargetElementName="VisualRoot" />
                    </telerikAnimation:AnimationGroup>-->
 
                    <!-- AutoHideArea animations -->
 
                    <!-- Left AutoHideArea animations -->
                    <telerikAnimation:AnimationGroup AnimationName="LeftIn">
                        <telerikAnimation:SlideAnimation SlideMode="Top"
                                Duration="{StaticResource AutoHideInAnimationDuration}"
                                TargetElementName="PopupChild" Orientation="Horizontal"
                                Direction="In" />
 
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild" Direction="In" />-->
                    </telerikAnimation:AnimationGroup>
 
                    <telerikAnimation:AnimationGroup AnimationName="LeftOut">
                        <telerikAnimation:SlideAnimation TargetElementName="PopupChild"
                                SlideMode="Top"
                                Duration="{StaticResource AutoHideOutAnimationDuration}"
                                Orientation="Horizontal" Direction="Out" />
 
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                                        Direction="Out" />-->
                    </telerikAnimation:AnimationGroup>
 
                    <!-- Top AutoHideArea animations -->
 
                    <telerikAnimation:AnimationGroup AnimationName="TopIn">
                        <telerikAnimation:SlideAnimation Orientation="Vertical"
                                Duration="{StaticResource AutoHideInAnimationDuration}"
                                TargetElementName="PopupChild" Direction="In" />
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                                        Direction="In" />-->
                    </telerikAnimation:AnimationGroup>
 
                    <telerikAnimation:AnimationGroup AnimationName="TopOut">
                        <telerikAnimation:SlideAnimation TargetElementName="PopupChild"
                                Duration="{StaticResource AutoHideOutAnimationDuration}"
                                Orientation="Vertical" Direction="Out" />
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                                        Direction="Out" />-->
                    </telerikAnimation:AnimationGroup>
 
                    <!-- Right AutoHideArea animations -->
 
                    <telerikAnimation:AnimationGroup AnimationName="RightIn">
                        <telerikAnimation:SlideAnimation SlideMode="Bottom"
                                TargetElementName="PopupChild"
                                Duration="{StaticResource AutoHideInAnimationDuration}"
                                Orientation="Horizontal" Direction="In" />
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                                        Direction="In" />-->
                    </telerikAnimation:AnimationGroup>
 
                    <telerikAnimation:AnimationGroup AnimationName="RightOut">
                        <telerikAnimation:SlideAnimation TargetElementName="PopupChild"
                                SlideMode="Bottom"
                                Duration="{StaticResource AutoHideOutAnimationDuration}"
                                Orientation="Horizontal" Direction="Out" />
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                                        Direction="Out" />-->
                    </telerikAnimation:AnimationGroup>
 
                    <!-- Bottom AutoHideArea animations -->
 
                    <telerikAnimation:AnimationGroup AnimationName="BottomIn">
                        <telerikAnimation:SlideAnimation SlideMode="Bottom"
                                Duration="{StaticResource AutoHideInAnimationDuration}"
                                Orientation="Vertical" TargetElementName="PopupChild" Direction="In" />
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                Direction="In" />-->
                    </telerikAnimation:AnimationGroup>
                    <telerikAnimation:AnimationGroup AnimationName="BottomOut">
                        <telerikAnimation:SlideAnimation
                                Duration="{StaticResource AutoHideOutAnimationDuration}"
                                TargetElementName="PopupChild" Direction="Out"
                                Orientation="Vertical" SlideMode="Bottom" />
                        <!--<telerikAnimation:FadeAnimation TargetElementName="PopupChild"
                                Direction="Out" />-->
                    </telerikAnimation:AnimationGroup>
                </telerikAnimation:AnimationSelector>
            </telerikAnimation:AnimationManager.AnimationSelector>
 
            <telerik:RadDocking.DocumentHost>
 
                <telerik:RadSplitContainer>
                    <telerik:RadPaneGroup>
                        <telerik:RadDocumentPane Header="Document 1" Title="Document 1" />
                    </telerik:RadPaneGroup>
                </telerik:RadSplitContainer>
 
            </telerik:RadDocking.DocumentHost>
 
            <telerik:RadSplitContainer Orientation="Vertical" InitialPosition="DockedLeft">
                <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="200, 300">
                    <telerik:RadPane Header="Pane Left 1" IsPinned="False">
                        <TextBlock Text="Pane Left 1" />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup telerik:ProportionalStackPanel.RelativeSize="200, 100">
                    <telerik:RadPane Header="Pane Left 2" IsPinned="False">
                        <TextBlock Text="Pane Left 2" />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
                <telerik:RadPaneGroup>
                    <telerik:RadPane Header="Pane Left 3">
                        <TextBlock Text="Pane Left 3" />
                    </telerik:RadPane>
                </telerik:RadPaneGroup>
            </telerik:RadSplitContainer>
        </telerik:RadDocking>
    </Grid>
</Window>

I hope this helps.

Regards,
Masha
Telerik
0
Pascal GUERY
Top achievements
Rank 1
answered on 18 Feb 2014, 02:54 PM
Thank you for your detailed answer
Tags
Docking
Asked by
Pascal GUERY
Top achievements
Rank 1
Answers by
Masha
Telerik team
Pascal GUERY
Top achievements
Rank 1
Share this question
or