# Other .NET Programming > Windows Presentation Foundation (WPF) & XAML forum >  [RESOLVED] Help WPF Slide Transition Effect between Views

## jedihok

dear Master,

after searching and searching on internet, i almost figure this out. By some references from expert I manage to design 'MDI' and show the child form in mainform. What i want is show animation when child form shown on mainform (slide transition effect).
On my project I have :
1. mainwindow.xaml
2. page1.xaml (usercontrol)

the XAML for mainwindow as follow :



```
<Window x:Class="MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="350" Width="525">
    <Grid HorizontalAlignment="Left" Height="38" VerticalAlignment="Top" Width="525" Margin="0,0,-8,0">
        <Grid.Resources>
            <Storyboard x:Key="TransformImage">
                <DoubleAnimation
        Storyboard.TargetName="page1"
        Storyboard.TargetProperty="RenderTransform.(TranslateTransform.X)"
        By="100" Duration="0:0:3">
                </DoubleAnimation>
            </Storyboard>
        </Grid.Resources>
        <Grid.Triggers>
            <EventTrigger RoutedEvent="Button.Click" SourceName="btnClick">
                <BeginStoryboard Storyboard="{StaticResource TransformImage}"/>
            </EventTrigger>
        </Grid.Triggers>
        
        <StackPanel x:Name="Stk" HorizontalAlignment="Left" Height="281" Margin="-1,40,0,-283" VerticalAlignment="Top" Width="519"/>
        <Button x:Name="btnClick" Content=" Show Child" HorizontalAlignment="Left" Margin="10,10,0,6" Width="75" Click="Button_Click"/>
    </Grid>
</Window>
```

I want to show page1.xaml using slide transition effect, but I got error when I pressed BtnClick where page1.xaml not exist within mainform.xaml

Please help me.

regards

----------


## jedihok

Finally i manage to make transition effect on my project by applying MahApps.Metro TransitioningContentControl. Here what I did on XAML :




> <Controls:MetroWindow x:Class="MainWindow"
>                       xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
>                       xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>                       xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
>                       Title="MainWindow" 
>                       Height="350" 
>                       Width="525">
> 
>     <Grid Margin="0,40,0,0">
> ...


And the code behind as follow




> Imports MahApps.Metro.Controls
> Partial Public Class MainWindow
> 
>     Private Sub btnClick_Click(sender As Object, e As RoutedEventArgs) Handles btnClick.Click
>         Dim pageww As New page1
>         transitioning.Content = pageww
>     End Sub
> End Class


Maybe can be useful for anyone like to apply transition effect on project N.B : still I want to find out the hard way by using storyboard and trigger

----------

