I am having an issue when I have both IsVirtualizing and PreservePositionWhenMaximized set to true.
Here is the window code.
Here is the code behind.
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
​
Here is the window code.
<
Window
x:Class
=
"TileTest.MainWindow"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
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
​