locked
How do flipview with auto animated view with the indicator RRS feed

  • Question

  • Hi Everybody,

                I want flipview with auto animated moves. And also it should show the indiator like dot or rectangle shape.

    Please help me.

    Wednesday, December 16, 2015 1:03 PM

All replies

  • Hi Everybody,

                  I find a solution for indicator.

    This is my code

     <FlipView Margin="0,2" ItemsSource="{Binding lstOffer}" SelectedItem="{Binding SelectedOffer,Mode=TwoWay}" MaxWidth="{Binding ScreenWidth}" MaxHeight="{Binding ScreenHeight}">                    
                        <FlipView.ItemTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Image Source="{Binding image_url}" Stretch="Fill" MaxWidth="{Binding ScreenWidth}"
                               MaxHeight="{Binding ScreenHeight}" />
                                </Grid>
                            </DataTemplate>
                        </FlipView.ItemTemplate>
                    </FlipView>
                    <ItemsControl ItemsSource="{Binding lstOffer}" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,20">
                        <ItemsControl.ItemsPanel>
                            <ItemsPanelTemplate>
                                <StackPanel Orientation="Horizontal" />
                            </ItemsPanelTemplate>
                        </ItemsControl.ItemsPanel>
                        <ItemsControl.ItemTemplate>
                            <DataTemplate>
                                <Grid Height="15" Width="15" Margin="5,0">
                                    <Ellipse Fill="Black" RenderTransformOrigin="0.5,0.5" Visibility="{Binding SelectedOffer}">
                                        <Ellipse.RenderTransform>
                                            <CompositeTransform ScaleX="1.25" ScaleY="1.25" />
                                        </Ellipse.RenderTransform>
                                    </Ellipse>
                                    <Ellipse Fill="Gainsboro"/>
                                </Grid>
                            </DataTemplate>
                        </ItemsControl.ItemTemplate>
                    </ItemsControl>

    Here my problem is:

                      I want to highlight the indicator which is the current item selected. That is if the current item 2nd one, the 2nd indicator should be highlighted.

    Here I set 

    SelectedOffer = lstOffer[0];

    How achieve this?

    if I use converter means i dont know how to write a logic. Please give an idea.


    • Edited by Shaafs Thursday, December 17, 2015 9:25 AM
    Thursday, December 17, 2015 9:22 AM