Footer and Scrolling Issue

6 posts, 0 answers
  1. Mauro
    Mauro avatar
    24 posts
    Member since:
    Apr 2011

    Posted 17 Apr 2012 Link to this post

    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.


    <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?
  2. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 18 Apr 2012 Link to this post

    Hello Mauro,

     Thanks for contacting us and for reporting this issue.

    I would like to inform you that we have been able to reproduce it on our side using the code snippets that you have provided. We will investigate the case and provide a fix for it in an upcoming Internal Build that you will be able to download from our website.

    I have added 1000 Telerik points for bringing our attention to this issue.

    As for not being able to upload your project: files can be uploaded only in Support Tickets for security reasons. In our forums uploads of projects are not allowed due to the concerns that might arise regarding publishing proprietary source code, etc.

    Let me know in case you have further questions or need assistance.

    Regards,
    Deyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Mauro
    Mauro avatar
    24 posts
    Member since:
    Apr 2011

    Posted 18 Apr 2012 Link to this post

    Hi Deyan,

    Cool...thank you very much :)

    Just out of interest were you also able to replicate the update that I posted, regarding the alignment sometimes being in the middle, sometimes at the bottom when changing the sources? From what I have seen it happens very randomly.

    Thanks again

    Regards,
    Mauro

  5. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 18 Apr 2012 Link to this post

    Hi Mauro,

    Yes, we have been able to reproduce it in ways, different from what you have described. The issue is caused by special viewport calculations that did not happen in a particular case.

    The planned IB that will contain the fix will be released today and you will be able to check it out. 

    Regards,
    Deyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Mauro
    Mauro avatar
    24 posts
    Member since:
    Apr 2011

    Posted 18 Apr 2012 Link to this post

    Hey Deyan,

    Thanks very much...I'm really impressed by your fast turn around time :)

    Thanks so much for sorting the issue out :)

    Regards,
    Mauro
  7. Deyan
    Admin
    Deyan avatar
    2041 posts

    Posted 19 Apr 2012 Link to this post

    Hello Mauro,

    Our latest IB has been published.

    You should be able to find it in the Downloads section of your Telerik account.

    Check it out and let us know in case you notice something as this is just an Internal Build that has not been entirely tested.

    Thanks for your time.

    Greetings,
    Deyan
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top
DevCraft banner