This is a migrated thread and some comments may be shown as answers.

IsVirtualizing and PreservePositionWhenMaximized issue

2 Answers 19 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 21 Aug 2014, 06:19 PM
I am having an issue when I have both IsVirtualizing and PreservePositionWhenMaximized set to true.

Here is the window code.
<Window x:Class="TileTest.MainWindow"
        Title="MainWindow" Height="350" Width="525"
        WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <DataTemplate x:Key="ItemTemplate">
            <TextBlock Text="{Binding}" />
        </DataTemplate>
        <DataTemplate x:Key="ContentTemplate">
            <telerik:RadFluidContentControl>
                <telerik:RadFluidContentControl.SmallContent>
                    <TextBlock Text="small" />
                </telerik:RadFluidContentControl.SmallContent>
                <telerik:RadFluidContentControl.Content>
                    <TextBlock Text="default" />
                </telerik:RadFluidContentControl.Content>
                <telerik:RadFluidContentControl.LargeContent>
                    <TextBlock Text="large" />
                </telerik:RadFluidContentControl.LargeContent>
            </telerik:RadFluidContentControl>
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadTileView x:Name="radTileView"
                             ContentTemplate="{StaticResource ContentTemplate}"
                             ItemTemplate="{StaticResource ItemTemplate}"
                              
                             MinimizedColumnWidth="200"
                             MinimizedRowHeight="200"
                              
                             PreservePositionWhenMaximized="True"
                              
                             IsVirtualizing="True"
                             />   
    </Grid>
</Window>


Here is the code behind.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
 
namespace TileTest
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
             
            var data = new List<string>();
            foreach (var num in Enumerable.Range(1, 12))
            {
                data.Add(String.Format("Item {0}", num));
            }
 
            this.radTileView.ItemsSource = data;       
        }
    }
}


This gives a view with 12 items.  If I double click the header of "item 1", it will maximize.  If I scroll down to "item 12"
 and double click it, it will maximize and the scroll possition will change slightly. If I scroll to the top of the small list, "item 1" is gone.  If I restore "item 12" (all items normal size), "item 1" reappears.

If I set either the IsVirtualizing or PreservePositionWhenMaximized to false, the items do not "disappear".  PreservePositionWhenMaximized needs to be true for our impementaion and disabling virualization is less than ideal.

Any ideas?

Ryan







​

2 Answers, 1 is accepted

Sort by
0
Ryan
Top achievements
Rank 1
answered on 21 Aug 2014, 06:49 PM
I forgot to mention - I am running 2014.2.617.40. I downloaded 2014.2.818.40 and saw the same behavior.
0
Zarko
Telerik team
answered on 22 Aug 2014, 03:31 PM
Hello Ryan,
Thank you for the feedback. It really seems like a bug and I logged it in our feedback portal where you'll be able to track its progress. You've already found the possible workarounds and unfortunately I can't give you another one.
I've updated your Telerik account and if you have further questions please feel free to ask.

Regards,
Zarko
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
TileView
Asked by
Ryan
Top achievements
Rank 1
Answers by
Ryan
Top achievements
Rank 1
Zarko
Telerik team
Share this question
or