This question is locked. New answers and comments are not allowed.
Hi,
I'm not sure if I'm doing something wrong. When I have a footer and I change the amount of items in the datasource, I cannot scroll up anymore.
I couldnt attach a sample project (Why is that...it would have made it much easier for you guys?) so I have pasted the code for the xaml and code behind here.
and the code behind
In order to replicate it, click the first bottom button, called "load 100", then click the next one "load 10" and then finally the "load 0" button. Then reverse the clicks (IE. Click from "load 0" to "load 100") and once you have clicked the "load 100", you cannot scroll to the top anymore.
Is there some setting that I'm maybe missing that is causing the issue?
Thanks very much
Regards,
Mauro
Update : I also see that sometimes while changing, the items are all of a sudden vertically aligned in the middle or the bottom of the page?
I'm not sure if I'm doing something wrong. When I have a footer and I change the amount of items in the datasource, I cannot scroll up anymore.
I couldnt attach a sample project (Why is that...it would have made it much easier for you guys?) so I have pasted the code for the xaml and code behind here.
<Grid x:Name="LayoutRoot" Background="Transparent"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> </Grid.RowDefinitions> <!-- TitlePanel contains the name of the application and page title --> <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28"> <TextBlock x:Name="ApplicationTitle" Style="{StaticResource PhoneTextNormalStyle}" Text="MY APPLICATION" /> <TextBlock x:Name="PageTitle" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}" Text="page name" /> </StackPanel> <!-- ContentPanel - place additional content here --> <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <telerikPrimitives:RadDataBoundListBox x:Name="ListBox" Grid.Row="1" Margin="{StaticResource PhoneVerticalMargin}" EmptyContentDisplayMode="DataSourceEmpty" IsAsyncBalanceEnabled="False" ItemsSource="{Binding Scores}" ScrollViewer.HorizontalScrollBarVisibility="Disabled" x:FieldModifier="private"> <!-- Item Added Animation --> <telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation> <telerikCore:RadFadeAnimation Duration="0:0:0.2" EndOpacity="1" StartOpacity="0"> <telerikCore:RadFadeAnimation.Easing> <CubicEase EasingMode="EaseIn" /> </telerikCore:RadFadeAnimation.Easing> </telerikCore:RadFadeAnimation> </telerikPrimitives:RadDataBoundListBox.ItemAddedAnimation> <!-- Item Removed Animation --> <telerikPrimitives:RadDataBoundListBox.ItemRemovedAnimation> <telerikCore:RadFadeAnimation Duration="0:0:0.1" EndOpacity="0" StartOpacity="1"> <telerikCore:RadFadeAnimation.Easing> <CubicEase EasingMode="EaseIn" /> </telerikCore:RadFadeAnimation.Easing> </telerikCore:RadFadeAnimation> </telerikPrimitives:RadDataBoundListBox.ItemRemovedAnimation> <!-- Empty Content Template --> <telerikPrimitives:RadDataBoundListBox.EmptyContentTemplate> <DataTemplate> <Grid HorizontalAlignment="Center" VerticalAlignment="Center"> <TextBlock Style="{StaticResource PhoneTextNormalStyle}" Text="No Info" TextAlignment="Center" TextWrapping="Wrap" /> </Grid> </DataTemplate> </telerikPrimitives:RadDataBoundListBox.EmptyContentTemplate> <!-- Footer Template --> <telerikPrimitives:RadDataBoundListBox.ListFooterTemplate> <DataTemplate> <TextBlock Style="{StaticResource PhoneTextAccentStyle}" Text="Footer" TextAlignment="Center" TextWrapping="Wrap" /> </DataTemplate> </telerikPrimitives:RadDataBoundListBox.ListFooterTemplate> </telerikPrimitives:RadDataBoundListBox> </Grid> </Grid> <!-- Sample code showing usage of ApplicationBar --> <phone:PhoneApplicationPage.ApplicationBar> <shell:ApplicationBar IsMenuEnabled="True" IsVisible="True"> <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Load 100" Click="Load100" /> <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Load 10" Click="Load10"/> <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Load 0" Click="Load0" /> </shell:ApplicationBar> </phone:PhoneApplicationPage.ApplicationBar>and the code behind
public partial class MainPage : PhoneApplicationPage { // Constructor public MainPage() { InitializeComponent(); } private void Load10 (object sender, EventArgs e) { IList<int> aa = new List<int>(); for (int i = 0; i < 10; i++) { aa.Add(i); } ListBox.ItemsSource = aa; } private void Load100 (object sender, EventArgs e) { IList<int> aa = new List<int>(); for (int i = 0; i < 100; i++) { aa.Add(i); } ListBox.ItemsSource = aa; } private void Load0 (object sender, EventArgs e) { ListBox.ItemsSource = new List<int>(); ; } }In order to replicate it, click the first bottom button, called "load 100", then click the next one "load 10" and then finally the "load 0" button. Then reverse the clicks (IE. Click from "load 0" to "load 100") and once you have clicked the "load 100", you cannot scroll to the top anymore.
Is there some setting that I'm maybe missing that is causing the issue?
Thanks very much
Regards,
Mauro
Update : I also see that sometimes while changing, the items are all of a sudden vertically aligned in the middle or the bottom of the page?