Sample Please......

Aug 14, 2009 at 7:26 AM

Please help Me with a C# sample project for transition.....

i tried like this below.......

private void Button_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.TransitionBox.Content = g2;
        }

        private void ff_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            this.TransitionBox.Content = g1;
        }

        private void MainWindow_Loaded(object sender, System.Windows.RoutedEventArgs e)
        {
            this.TransitionBox.Transition = new Transitionals.Transitions.CheckerboardTransition();
            this.TransitionBox.Content = g1;
           
        }

where g1 and g2 are Grids.....

Please Help

Aug 19, 2009 at 1:11 PM

I do every thing in WPF Designer, you can do the same thing in code. Just create the right element objects ( SlideShowItem ) and add them to the right collection. Hope this helps

<!-- Transition Control for DataGrids -->
                        <tranc:Slideshow Grid.Row="1"  Name="slideshow" Loaded="slideshow_Loaded" AutoAdvanceDuration="0:0:10" AutoAdvance="True" >
                            <tranc:SlideshowItem>
                                <StackPanel>
                                    <StackPanel.BitmapEffect>
                                        <DropShadowBitmapEffect Color="#FF72909B" />
                                    </StackPanel.BitmapEffect>
                                    <TextBlock Text=" Top 10 Sales " />
                                    <my:DataGrid   HeadersVisibility="Column"  CanUserAddRows="False"  CanUserDeleteRows="False" CanUserResizeRows="False" HorizontalGridLinesBrush="#FF7094B0" VerticalGridLinesBrush="#FFC2D2DF" ItemsSource="{Binding Source={StaticResource top10a}}">
                                    </my:DataGrid>
                                </StackPanel>
                            </tranc:SlideshowItem>

                            <tranc:SlideshowItem>
                                <StackPanel>
                                    <StackPanel.BitmapEffect>
                                        <DropShadowBitmapEffect Color="#FF72909B" />
                                    </StackPanel.BitmapEffect>
                                    <TextBlock Text=" Top 10 Aged " />
                                    <my:DataGrid  HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HorizontalGridLinesBrush="#FF7094B0" VerticalGridLinesBrush="#FFC2D2DF" ItemsSource="{Binding Source={StaticResource top10b}}">
                                    </my:DataGrid>
                                </StackPanel>
                            </tranc:SlideshowItem>

                            <tranc:SlideshowItem>
                                <StackPanel>
                                    <StackPanel.BitmapEffect>
                                        <DropShadowBitmapEffect Color="#FF72909B" />
                                    </StackPanel.BitmapEffect>
                                    <TextBlock Text=" Top 10 Territory " />
                                    <my:DataGrid  HeadersVisibility="Column"  CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HorizontalGridLinesBrush="#FF7094B0" VerticalGridLinesBrush="#FFC2D2DF" ItemsSource="{Binding Source={StaticResource top10c}}">
                                    </my:DataGrid>
                                </StackPanel>
                            </tranc:SlideshowItem>

                            <tranc:SlideshowItem>
                                <StackPanel>
                                    <StackPanel.BitmapEffect>
                                        <DropShadowBitmapEffect Color="#FF72909B" />
                                    </StackPanel.BitmapEffect>
                                    <TextBlock Text=" Top 10 Vertical " />
                                    <my:DataGrid HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HorizontalGridLinesBrush="#FF7094B0" VerticalGridLinesBrush="#FFC2D2DF" ItemsSource="{Binding Source={StaticResource top10d}}">
                                    </my:DataGrid>
                                </StackPanel>
                            </tranc:SlideshowItem>

                            <tranc:SlideshowItem>
                                <StackPanel>
                                    <StackPanel.BitmapEffect>
                                        <DropShadowBitmapEffect Color="#FF72909B" />
                                    </StackPanel.BitmapEffect>
                                    <TextBlock Text=" Top 10 Unit " />
                                    <my:DataGrid HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HorizontalGridLinesBrush="#FF7094B0" VerticalGridLinesBrush="#FFC2D2DF"  ItemsSource="{Binding Source={StaticResource top10f_Unit}}">
                                    </my:DataGrid>
                                </StackPanel>
                            </tranc:SlideshowItem>
                            <tranc:SlideshowItem>
                                <StackPanel>
                                    <StackPanel.BitmapEffect>
                                        <DropShadowBitmapEffect Color="#FF72909B" />
                                    </StackPanel.BitmapEffect>
                                    <TextBlock Text=" Top 10 Make " />
                                    <my:DataGrid  HeadersVisibility="Column" CanUserAddRows="False" CanUserDeleteRows="False" CanUserResizeRows="False" HorizontalGridLinesBrush="#FF7094B0" VerticalGridLinesBrush="#FFC2D2DF"  ItemsSource="{Binding Source={StaticResource top10f_Make}}">
                                    </my:DataGrid>
                                </StackPanel>
                            </tranc:SlideshowItem>
                        </tranc:Slideshow>