Another hard crash in TileView Q1 2011

2 posts, 0 answers
  1. David
    David avatar
    3 posts
    Member since:
    Sep 2010

    Posted 01 Jun 2011 Link to this post

    Hallo,
    I had another problem with WPF TileView today.
    When I have two TileViews on one Grid (each in it's own Grid row) application crashes bacause of Telerik exception ""Unable to maximize an item with the current configuration. "" after I try to maximize any TileViewItem. It's in Telerik's TileViewPanel.cs:1317 (we have licence+Telerik code..)

    Please help!
    Thank you.
     David.

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
    <telerik:RadTileView Grid.Row="1"  
                TileStateChangeTrigger="SingleClick"
                MaximizeMode="ZeroOrOne"
                IsItemDraggingEnabled="True"
                PreservePositionWhenMaximized="True"
                MinimizedColumnWidth="100"
                IsAutoScrollingEnabled="True"
                IsAnimationOptimized="True"
                ColumnsCount="1"
                MaxColumns="1"
                >
        <telerik:RadTileViewItem Header="tile1 - RestoredHeight height 100" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RestoredHeight="100" >
            <Grid>
                <TextBox Text="test1" />
            </Grid>
        </telerik:RadTileViewItem>
        <telerik:RadTileViewItem Header="tile2 - RestoredHeight height 100" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RestoredHeight="100" >
            <Grid>
                <TextBox Text="test2" />
            </Grid>
        </telerik:RadTileViewItem>
        <telerik:RadTileViewItem Header="tile3 - RestoredHeight height 100" VerticalAlignment="Stretch" RestoredHeight="100"  HorizontalAlignment="Stretch" >
            <Grid>
                <TextBox Text="test3 " />
            </Grid>
        </telerik:RadTileViewItem>
        <telerik:RadTileViewItem Header="tile4 - RestoredHeight height 150" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RestoredHeight="150" >
            <Grid>
                <TextBox Text="test2" />
            </Grid>
        </telerik:RadTileViewItem>
    </telerik:RadTileView>
          
    <GridSplitter Grid.Row="2" HorizontalAlignment="Stretch" Height="3" />
          
    <telerik:RadTileView Grid.Row="3"  
                TileStateChangeTrigger="SingleClick"
                MaximizeMode="ZeroOrOne"
                IsItemDraggingEnabled="True"
                PreservePositionWhenMaximized="True"
                MinimizedColumnWidth="100"
                IsAutoScrollingEnabled="True"
                IsAnimationOptimized="True"
                ColumnsCount="1"
                MaxColumns="1"
                >
        <telerik:RadTileViewItem Header="tile1 - RestoredHeight height 100" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RestoredHeight="100" >
            <Grid>
                <TextBox Text="test1" />
            </Grid>
        </telerik:RadTileViewItem>
        <telerik:RadTileViewItem Header="tile2 - RestoredHeight height 100" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RestoredHeight="100" >
            <Grid>
                <TextBox Text="test2" />
            </Grid>
        </telerik:RadTileViewItem>
        <telerik:RadTileViewItem Header="tile3 - RestoredHeight height 100" VerticalAlignment="Stretch" RestoredHeight="100"  HorizontalAlignment="Stretch" >
            <Grid>
                <TextBox Text="test3 " />
            </Grid>
        </telerik:RadTileViewItem>
        <telerik:RadTileViewItem Header="tile4 - RestoredHeight height 150" VerticalAlignment="Stretch" HorizontalAlignment="Stretch" RestoredHeight="150" >
            <Grid>
                <TextBox Text="test2" />
            </Grid>
        </telerik:RadTileViewItem>
    </telerik:RadTileView>
          
    </Grid>
  2. Zarko
    Admin
    Zarko avatar
    755 posts

    Posted 02 Jun 2011 Link to this post

    Hello David,
    You are experiencing this problem because you measure the RadTileView with infinity (horizontally, because of the rows height - Auto) and you haven't set the MinimizedRowHeight property. The default value of the MinimizedRowHeight is a star ("*") which means that the RadTileView splits the available space in equal portions and sets the items there, but it can't split infinity. So if you want to measure the RadTileView with infinity (if it's in row with height Auto, in StackPanel or in a ScrollViewer) you'll have to set some kind of restriction - MaxHeight, Height or MinimizedRowHeight.
    I've created a sample project so you could examine it and if you have further questions feel free to ask. 

    Best wishes,
    Zarko
    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
  3. DevCraft banner
Back to Top