9 Answers, 1 is accepted
The TransitionControl is designed to displayed transitions between different Contents or ContentTemplates. Because of this you need to set either the Content or ContentTemplate in order to run the transition. For the sake of simplicity I suggest to change between your two grids the way you would do it if you had to change the Content or ContentTemplate of a normal ContentControl.
Hope this helps.
Miroslav Nedyalkov
the Telerik team

Can you provide a simple sample?
You could refer to the demos application. You could also take a look at the Silverlight demos of the control here (the WPF version works exactly the same way).
Hope this helps.
All the best,
Miroslav Nedyalkov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Thank you for replying.
The samples provided use data binding.
I don't want use data bindind.
What I need is show one or another grid, using the control efect.
Regards, JP.
I created and attached a sample project for you showing how to use RadTransitionControl with GridView without bindings.
Hope this is helpful.
Kind regards,
Vladi
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

can you please tell me how i can pass datatable from mainwin to gridview in user control
can you please give a very small project to do this
thx in advance
I am not sure what you mean by "datatable from mainwin" but if you want to pass the DataContext that is set in the MainWindow you could simply pass it by element name to the content that is set to the RadTransitionControl. The next code snippets shows the described approach:
- In the MainWidnow:
<
Window.Resources
>
<
local:ViewModel
x:Key
=
"ViewModel"
/>
</
Window.Resources
>
<
Grid
ShowGridLines
=
"True"
DataContext
=
"{StaticResource ViewModel}"
x:Name
=
"MainGrid"
>
<
Grid.RowDefinitions
>
<
RowDefinition
Height
=
"Auto"
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
StackPanel
Grid.Row
=
"0"
Orientation
=
"Horizontal"
VerticalAlignment
=
"Center"
HorizontalAlignment
=
"Center"
>
<
Button
Content
=
"Show GridView1.xaml"
Click
=
"Button_Click_1"
Margin
=
"10"
/>
<
Button
Content
=
"Show GridView2.xaml"
Click
=
"Button_Click_2"
Margin
=
"10"
/>
</
StackPanel
>
<
telerik:RadTransitionControl
x:Name
=
"RadTransitionControl"
Grid.Row
=
"1"
VerticalAlignment
=
"Bottom"
>
<
telerik:RadTransitionControl.Content
>
<
local:GridView1
DataContext
=
"{Binding ElementName=MainGrid, Path=DataContext}"
/>
</
telerik:RadTransitionControl.Content
>
<
telerik:RadTransitionControl.Transition
>
<
telerik:SlideAndZoomTransition
/>
</
telerik:RadTransitionControl.Transition
>
</
telerik:RadTransitionControl
>
</
Grid
>
- And in the code behind where the content is changed:
private
void
Button_Click_1(
object
sender, RoutedEventArgs e)
{
var gridView1 =
new
GridView1() { DataContext =
this
.MainGrid.DataContext };
this
.RadTransitionControl.Content = gridView1;
}
private
void
Button_Click_2(
object
sender, RoutedEventArgs e)
{
var gridView2 =
new
GridView1() { DataContext =
this
.MainGrid.DataContext };
this
.RadTransitionControl.Content = gridView2;
}
The code snippets are taken from the previously attached sample project. Hope this is helpful.
Regards,
Vladi
Telerik
Check out the new Telerik Platform - the only modular platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native apps. Register for the free online keynote and webinar to learn more about the Platform on Wednesday, February 12, 2014 at 11:00 a.m. ET (8:00 a.m. PT).

i explain my case
i have an wpf application with a maiwindow and two control user,each control user contain a gridview,in the mainwindow i have a datatable that contain some data,when i click on a button in mainwindow the user control move normally(with transitioncontrol) and the gridview(contained on this user control) must be filled by the data contained in datable that belong to the mainwindow.
so,how can i pass the datatable to the the user control?
thx :)
I would suggest you to check the "Various Data Sources" WPF Demo on how to set the ItemsSource specifying a valid Source for the Binding. There is also an option populating data from a DataTable.
Regards,
Didie
Telerik