Slide Show

Mar 4, 2009 at 8:10 PM
Please pardon my ignorance. I am trying to implement SlideShow within Transitionls control. I am trying to do every thing in the designer. I have a slide show of two different DataGrids controls each in a different Slide Show. I would like both of them to fade in and out between the transitions. At this moment the slide show works but THERE IS NO ANIMATION BETWEEN THE TRANSITIONS. Can any body take a look at it and please tell me what I am doing wrong here.

......

    xmlns:tranc="clr-namespace:Transitionals.Controls;assembly=Transitionals"
    xmlns:trant="clr-namespace:Transitionals.Transitions;assembly=Transitionals"

......

<tranc:TransitionElement Name="TransitionBox" >
            <ContentControl>
                <tranc:Slideshow  AutoAdvance="True" >
                    <tranc:SlideshowItem>
                         <my:DataGrid   AutoGenerateColumns="True" ItemsSource="{Binding Source={StaticResource ObjData}, Path=Tests}">
                    </my:DataGrid>
                    </tranc:SlideshowItem>
                    <tranc:SlideshowItem>
                        <my:DataGrid   AutoGenerateColumns="True" ItemsSource="{Binding Source={StaticResource ObjData}, Path=Tops}">
                    </my:DataGrid>
                    </tranc:SlideshowItem>
                </tranc:Slideshow>
            </ContentControl>     
                <tranc:TransitionElement.Transition>
                <trant:DotsTransition />                
            </tranc:TransitionElement.Transition>
        </tranc:TransitionElement>

....

Thanks

Dino

Mar 6, 2009 at 8:10 PM
I think I understand what you're trying to do but not the approach you'r taking.

You might be able to use SlideShow, but if you do there's no reason that the SlideShow should be nested within a TransitionElement. Use SlideShow OR TransitionElement, not both.

If you use SlideShow, you need to supply the SlideShow with the Transitions to use. Right now you're supplying the transition on TransitionElement, not on SlideShow. Since TransitionElement only has one child (the SlideShow) you'll never see a transition happen. Since SlideShow doesn't have a transition associated with it you'll never see a transition.
Mar 6, 2009 at 8:45 PM
Thanks jbienz,

Your advice was helpful and certainly cleared my head. For any one interested, here is the fixed code.

 <tranc:Slideshow Name="slideshow" AutoAdvance="True" >
            <tranc:SlideshowItem>
                 <my:DataGrid  Name="dataGrid1" ItemsSource="{Binding Source={StaticResource ObjData}}" HorizontalAlignment="Left"  Width="126" />
            </tranc:SlideshowItem>
            <tranc:SlideshowItem>
                <my:DataGrid  Name="dataGrid2" ItemsSource="{Binding Source={StaticResource ObjData2} }"/>
            </tranc:SlideshowItem>
            <tranc:Slideshow.Transition>
                <trant:HorizontalBlindsTransition />
            </tranc:Slideshow.Transition>
        </tranc:Slideshow>