We are trying to bind a ScrollStateChanged event in RadDataBoundListBox such as :
Xaml Code :
<telerikPrimitives:RadDataBoundListBox x:Name="MessagesList">
<i:Interaction.Triggers>
<i:EventTrigger EventName="ScrollStateChanged">
<Command:EventToCommand Command="{Binding ScrollChangedCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
<telerikPrimitives:StackVirtualizationStrategyDefinition ReorderMode="MoveItemsUp"/>
</telerikPrimitives:RadDataBoundListBox.VirtualizationStrategyDefinition>
</telerikPrimitives:RadDataBoundListBox>
and In our ViewModel we used RelayCommand as :
public ICommand ScrollChangedCommand
{
get
{
if (_ScrollChangedCommand == null)
{
_ScrollChangedCommand = new RelayCommand<object>(ScollChatList, (param) => ScrollChangedCommandCanExecute);
}
return _ScrollChangedCommand;
}
}
private void ScollChatList(object parameter)
{
ScrollStateChangedEventArgs scrollChangedEventArgs = parameter as ScrollStateChangedEventArgs;
//if (scrollChangedEventArgs != null && scrollChangedEventArgs. == ScrollState.Scrolling)
//{
//}
}
We are successfully able to bind this event in our ViewModel but 'scrollChangedEventArgs' value always be NULL. Any suggestion please..
Also we are trying to get either RadDataBoundListbox is scrolling upward or downward. Is it possible with RadDataBoundListBox ?
Thanks.