How to get Scroll offset in RadDataBoundListBox?

82 views Asked by At

We are trying to find vertical offset when user try to scroll the RadDataBoundListbox in windows phone 8 silverlight. For e.g : the position at which Listbox scrolled.

So far we are trying registering with ScrollStateChanged event but this event only returns Scrolling states like TopStretch, Scrolling, NotScrolling etc.

<telerikPrimitives:RadDataBoundListBox x:Name="MessagesList" IsAsyncBalanceEnabled="True" Style="{StaticResource RadDataBoundListBoxStyle1}">
                    <i:Interaction.Triggers>
                        <i:EventTrigger EventName="ScrollStateChanged">
                            <Command:EventToCommand Command="{Binding ScrollChangedCommand}" PassEventArgsToCommand="True"/>
                        </i:EventTrigger>                           
                    </i:Interaction.Triggers>                        
                </telerikPrimitives:RadDataBoundListBox>

We couldn't find any Event / approach to solve this problem.

Any idea regarding solving this problem might be helpful.

Thanks.

1

There are 1 answers

2
Igor Kulman On

You need to get the ScrollViewer from the RadDataBoundListBox and access it directly. There is no event for when the ScrollViewer scrolls like in WP81 and UWP so you need to create a binding to the VerticalOffset property and observe its changes.