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

Animation when hiding pane

5 Answers 139 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Lennart Bauer
Top achievements
Rank 1
Lennart Bauer asked on 17 May 2010, 10:31 AM
Hi!

I am using the "IsHidden" property to hide RadPanes in my WPF application.
This works fine.

What I want to do is to animate the "hiding/showing" of the panes. Is this possible?

Regards,
Lennart

5 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 20 May 2010, 11:44 AM
Hi Lennart,

 What do you mean by hiding/showing of panes? Do you mean the pane tabs or the whole group or the content of the group when the selected pane is changes? An image or video could be very helpful to understand what you exactly want to animate.

Best wishes,
Miroslav Nedyalkov
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.
0
Lennart Bauer
Top achievements
Rank 1
answered on 24 May 2010, 08:28 AM
Hi!

It's hard to show in pictures, but here is some code that will show you what I mean:

<

 

 

Window x:Class="DockTest.MainWindow"

 

 

 

xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

 

xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

 

xmlns:telerikDocking="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Docking"

 

 

 

 

Title="MainWindow" Height="350" Width="525">

 

 

 

 

 

<Grid>

 

 

 

 

<Grid.RowDefinitions>

 

 

 

 

<RowDefinition/>

 

 

 

 

<RowDefinition Height="Auto"/>

 

 

 

 

</Grid.RowDefinitions>

 

 

 

 

<telerikDocking:RadDocking Grid.Row="0">

 

 

 

 

<telerikDocking:RadSplitContainer Orientation="Horizontal">

 

 

 

 

<telerikDocking:RadPaneGroup>

 

 

 

 

<telerikDocking:RadPane x:Name="Pane1" Header="Pane 1" PaneHeaderVisibility="Collapsed">

 

 

 

 

<TextBox>Pane 1</TextBox>

 

 

 

 

</telerikDocking:RadPane>

 

 

 

 

</telerikDocking:RadPaneGroup>

 

 

 

 

</telerikDocking:RadSplitContainer>

 

 

 

 

<telerikDocking:RadSplitContainer Orientation="Horizontal">

 

 

 

 

<telerikDocking:RadPaneGroup>

 

 

 

 

<telerikDocking:RadPane x:Name="Pane2" Header="Pane 2" PaneHeaderVisibility="Collapsed">

 

 

 

 

<TextBox>Pane 2</TextBox>

 

 

 

 

</telerikDocking:RadPane>

 

 

 

 

</telerikDocking:RadPaneGroup>

 

 

 

 

</telerikDocking:RadSplitContainer>

 

 

 

 

</telerikDocking:RadDocking>

 

 

 

 

 

<Grid Grid.Row="1">

 

 

 

 

<Grid.ColumnDefinitions>

 

 

 

 

<ColumnDefinition/>

 

 

 

 

<ColumnDefinition/>

 

 

 

 

</Grid.ColumnDefinitions>

 

 

 

 

<Button Grid.Column="0" x:Name="Button1" Click="Button1_click">Hide Pane 1</Button>

 

 

 

 

<Button Grid.Column="1" x:Name="Button2" Click="Button2_click">Hide Pane 2</Button>

 

 

 

 

 

<x:Code><![CDATA[

 

void Button2_click(object sender, RoutedEventArgs e) {

if (Pane2.IsHidden)

{

Pane2.IsHidden = false;

Button2.Content = "Hide Pane 2";

}

else

{

Pane2.IsHidden = true;

Button2.Content = "Show Pane 2";

}

}

void Button1_click(object sender, RoutedEventArgs e) {

if (Pane1.IsHidden)

{

Pane1.IsHidden = false;

Button1.Content = "Hide Pane 1";

}

else

{

Pane1.IsHidden = true;

Button1.Content = "Show Pane 1";

}

}

]]>

 

 

</x:Code>

 

 

 

 

</Grid>

 

 

 

 

</Grid>

 

</

 

 

Window>

 

0
Hristo
Telerik team
answered on 28 May 2010, 10:21 AM
Hi Lennart Bauer,

I'm sorry for the late response.
In order to animate the collapse you should use IsPinned property instead of IsHidden.

Let us know if you need more information.

All the best,
Hristo
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.
0
Lennart Bauer
Top achievements
Rank 1
answered on 28 May 2010, 05:52 PM
Thanks!

But I don't want to show the Auto-Hide area. How do I hide it? (pun not intended)
0
Miroslav Nedyalkov
Telerik team
answered on 02 Jun 2010, 03:13 PM
Hi Lennart,

 Now I understand - you want to animate showing-hiding of groups (when there is only one pane in a group, hiding the pane is equal to hiding the group). Unfortunately this is not supported by the Docking control. What I could suggest you is try to use the FluidMoveBehavior from the Blend library - it might help you achieve what you need.

Kind regards,
Miroslav Nedyalkov
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.
Tags
Docking
Asked by
Lennart Bauer
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Lennart Bauer
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or