Tuesday, 4 June 2013

How to bind data to listbox with soft refresh effect in windows phone

Hi today i'll show you how to make soft refresh while binding data to list-box data template. here you can do this using the styles that the triggers to list-box to make opacity low and high  with time duration here below is the code for xaml to make the soft binding data to listbox.

<ListBox.Triggers>
                                <EventTrigger RoutedEvent="FrameworkElement.Loaded">
                                    <BeginStoryboard>
                                        <Storyboard>                                            <DoubleAnimationStoryboard.TargetProperty="Opacity" Duration="00:00:05" From="1" To="0" Storyboard.TargetName="listBoxSpotlight" AutoReverse="True"/>
                                        </Storyboard>
                                    </BeginStoryboard>
                                </EventTrigger>                               

                            </ListBox.Triggers>

that will make data refreshing slowly and binding very smoothly while data is loaded and binding.

No comments:

Post a Comment