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

TileView doesn't render tiles in restore state initially

1 Answer 84 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Can
Top achievements
Rank 1
Can asked on 02 Jul 2010, 09:10 PM

Hi,

I'm using "RadControls for WPF Q1 2010 SP2". I don't know whether it's because of my settings or it is a bug but when the window is initialized the tiles are shown in Minimized state with small content. If I maximize one of them and then minimize them all again the previously maximized tile is shown in Restore state but the others are stiil shown in Minimized state.

Below is the XAML and CS code:

<Window x:Class="TestApp.MainWindow" 
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" 
        xmlns:telerikAnimation="clr-namespace:Telerik.Windows.Controls.Animation;assembly=Telerik.Windows.Controls" 
        xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation" 
        Title="MainWindow" Height="350" Width="525" 
        WindowState="Maximized"
  <Grid> 
    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalAlignment="Stretch" 
            HorizontalAlignment="Stretch" VerticalScrollBarVisibility="Auto" Padding="0" 
            BorderThickness="0" > 
      <Border Margin="10" HorizontalAlignment="Center" VerticalAlignment="Center"
        <Border.Resources> 
          <Style TargetType="TextBlock" x:Key="HeaderTitle"
            <Setter Property="Foreground" Value="Black" /> 
            <Setter Property="FontSize" Value="12" /> 
            <Setter Property="FontWeight" Value="Bold" /> 
            <Setter Property="FontFamily" Value="Segoe UI" /> 
            <Setter Property="VerticalAlignment" Value="Center" /> 
            <Setter Property="Padding" Value="0" /> 
          </Style> 
          <Style TargetType="TextBlock" x:Key="SmallBox"
            <Setter Property="Foreground" Value="#0b4366" /> 
            <Setter Property="FontSize" Value="12" /> 
            <Setter Property="FontWeight" Value="Normal" /> 
            <Setter Property="FontFamily" Value="Segoe UI" /> 
            <Setter Property="VerticalAlignment" Value="Center" /> 
            <Setter Property="Padding" Value="10 0" /> 
          </Style> 
          <DataTemplate x:Key="Package"
            <Grid> 
              <Border Style="{StaticResource DetailBorder}"
                <Grid> 
                  <Grid.RowDefinitions> 
                    <RowDefinition /> 
                    <RowDefinition /> 
                  </Grid.RowDefinitions> 
 
                  <Grid.ColumnDefinitions> 
                    <ColumnDefinition Width="Auto" /> 
                    <ColumnDefinition Width="Auto" /> 
                    <ColumnDefinition Width="Auto" /> 
                    <ColumnDefinition Width="65" /> 
                  </Grid.ColumnDefinitions> 
 
                  <TextBlock Grid.Row="0" Grid.Column="0" Text="Kod:" /> 
                  <TextBox Grid.Row="0" Grid.Column="1" Text="{Binding Path=Code}" /> 
 
                  <TextBlock Grid.Row="0" Grid.Column="2" Text="Form Miktar:" /> 
                  <TextBox Grid.Row="0" Grid.Column="3" Text="{Binding Path=ChildQty}" /> 
 
                  <TextBlock Grid.Row="1" Grid.Column="0" Text="Tanım:" /> 
                  <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding Path=Descr}" /> 
 
                  <TextBlock Grid.Row="1" Grid.Column="2" Text="Satış Miktar:" /> 
                  <TextBox Grid.Row="1" Grid.Column="3" Text="{Binding Path=ParentQty}" /> 
                </Grid> 
              </Border> 
            </Grid> 
          </DataTemplate> 
        </Border.Resources> 
        <telerikNavigation:RadTileView x:Name="rtvTest" Width="950" Height="400" 
                                     Grid.Column="1" Grid.Row="1"  
                                     ItemsSource="{Binding Products}" 
                                     MaximizeMode="ZeroOrOne"
          <telerikNavigation:RadTileView.ItemTemplate> 
            <DataTemplate> 
              <TextBlock Text="{Binding Path=Descr}" Style="{StaticResource HeaderTitle}"/> 
            </DataTemplate> 
          </telerikNavigation:RadTileView.ItemTemplate> 
          <telerikNavigation:RadTileView.ContentTemplate> 
            <DataTemplate> 
              <telerik:RadFluidContentControl telerikAnimation:AnimationManager.IsAnimationEnabled="True" 
                                            SmallToNormalThreshold="280, 130" 
                                            NormalToSmallThreshold="280, 130" 
                                            NormalToLargeThreshold="730, 350" 
                                            LargeToNormalThreshold="730, 350" > 
                <telerik:RadFluidContentControl.SmallContent> 
                  <Border Height="30" Width="190" > 
                    <TextBlock Text="{Binding SmallCode}" Style="{StaticResource SmallBox}"/> 
                  </Border> 
                </telerik:RadFluidContentControl.SmallContent> 
                <telerik:RadFluidContentControl.Content> 
                  <Border Height="130" Width="280"
                    <TextBlock Text="{Binding Path=NormalCode}" Style="{StaticResource SmallBox}" FontWeight="Bold" FontSize="14"/> 
                  </Border> 
                </telerik:RadFluidContentControl.Content> 
                <telerik:RadFluidContentControl.LargeContent> 
                  <Border Margin="30,80,30,30" Height="350" Width="730" > 
                    <TextBlock Text="{Binding Path=LargeCode}" Style="{StaticResource SmallBox}" FontWeight="DemiBold" FontSize="18"/> 
                  </Border > 
                </telerik:RadFluidContentControl.LargeContent> 
              </telerik:RadFluidContentControl> 
            </DataTemplate> 
          </telerikNavigation:RadTileView.ContentTemplate> 
 
        </telerikNavigation:RadTileView> 
      </Border> 
 
    </ScrollViewer> 
 
  </Grid> 
</Window> 

using System; 
using System.Collections.Generic; 
using System.Linq; 
using System.Text; 
using System.Windows; 
using System.Windows.Controls; 
using System.Windows.Data; 
using System.Windows.Documents; 
using System.Windows.Input; 
using System.Windows.Media; 
using System.Windows.Media.Imaging; 
using System.Windows.Navigation; 
using System.Windows.Shapes; 
 
namespace TestApp { 
 
  public partial class MainWindow : Window { 
    public MainWindow() { 
      InitializeComponent(); 
 
      rtvTest.ItemsSource = TestEntity.GetSampleList(); 
    } 
  } 
 
  public class TestEntity { 
    public string SmallCode { getset; } 
    public string NormalCode { getset; } 
    public string LargeCode { getset; } 
 
    public TestEntity(string smallCode, string normalCode, string largeCode) { 
      SmallCode = smallCode; 
      NormalCode = normalCode; 
      LargeCode = largeCode; 
    } 
 
    public static List<TestEntity> GetSampleList() { 
      List<TestEntity> result = new List<TestEntity>(); 
      result.Add(new TestEntity("A1""A11""A111")); 
      result.Add(new TestEntity("B1""B11""B111")); 
      result.Add(new TestEntity("C1""C11""C111")); 
      result.Add(new TestEntity("D1""D11""D111")); 
      result.Add(new TestEntity("E1""E11""E111")); 
      result.Add(new TestEntity("K1""K11""K111")); 
      result.Add(new TestEntity("X1""X11""X111")); 
 
      return result; 
    } 
  } 
 

Thanks in advance

1 Answer, 1 is accepted

Sort by
0
Kiril Stanoev
Telerik team
answered on 07 Jul 2010, 03:21 PM
Hi Can,

In your scenario it is a matter of adjusting the threshold values. When I set 450 px to RadTileView it worked, but I am not sure that it satisfies your scenario. We will be working on improving RadFluidContentControl during the next quarter (we have an official release in few days). Also, if you can't find the right thresholds, you can manually change the content state of the FluidContentControl. More information can be found here (scroll to the bottom of the page).

On a side note, I'd like to inform you that we've just released an online tool that allows you to reduce the size of your Silverlight applications. For more information, please visit http://blogs.telerik.com/blogs/posts/10-06-10/telerik_assembly_minifier.aspx

Regards,
Kiril Stanoev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
TileView
Asked by
Can
Top achievements
Rank 1
Answers by
Kiril Stanoev
Telerik team
Share this question
or