Accessing TileViewPanel

3 posts, 1 answers
  1. mitica
    mitica avatar
    7 posts
    Member since:
    May 2011

    Posted 08 Jun 2011 Link to this post


    is it possible to access the TileViewPanel.
    Basically, I need to know the actual available space for the maximized item in order to do some scaling for the UserControl hosted inside the TileViewItem. I assume that this information is available somewhere in this panel.

    Thank you!

  2. mitica
    mitica avatar
    7 posts
    Member since:
    May 2011

    Posted 09 Jun 2011 Link to this post


    to be more specific, I would like to have the MaximizedItem Container only as big as its content and not as big as the available space for it (by available space I mean ViewPort.Width - minimizedColumnWidth).

    I tried changing the template for the TileViewItem as below:
    <Style x:Key="RadTileViewItemStyle1" TargetType="telerikNavigation:RadTileViewItem">
                <Setter Property="Template">
                        <ControlTemplate TargetType="telerikNavigation:RadTileViewItem">
                            <Canvas> <!-- this used to be grid-- >
    Basically, I have replaced the outer grid with a canvas.
    Now, the MaximizedItem shows the way I wanted but there are some issues with the Restored and Minimized Items:
    - the restored item contains a ListBox defined as below

    telerik:RadFluidContentControl ContentChangeMode="Manual"
                                    <ContentControl Content="{Binding Path=ParametersList}" HorizontalAlignment="Left" Width="Auto" Height="Auto" />
    The problem is that when in RestoredState, the items expand way out vertically untill all the ListBoxItems are visible (no vertical scroll bar).

    Can you suggest a solution for implementing the described layout?

    Thank you
  3. Answer
    Zarko avatar
    755 posts

    Posted 09 Jun 2011 Link to this post

    Hi mitica,
    You can access the TileViewPanel through the RadTileView using the ChildrenOfType method like this:
    var panel = this.myTileView.ChildrenOfType<TileViewPanel>().FirstOrDefault();
    The problem is that you don't know the MaximizedItems content size before it is measured and you'll have to wait to adjust the MinimizedColumnWidth/Height. Also you can replace the Grid with Canvas only to the MaximizedItem with something like this:
    case TileViewItemState.Maximized:
                container.Style = this.Resources["RadTileViewItemStyle"] as Style;
    case TileViewItemState.Minimized:
    case TileViewItemState.Restored:
    For further references could you please examine the attached project? The only problem in it that because of the animation and dispatcher combination there could be some glitches.
    If you have more questions feel free to ask.

    Best wishes,
    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
Back to Top