TileViewItem - dynamically hiding Header

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

    Posted 10 Jun 2011 Link to this post


    I am trying to implement  the following scenario.
    There is a RadTileView using RadFluidContentControl, with the itemssource set to a collection of business objects exposing 3 different views for: Small, Normal, Large content.

    The LargeContent is a UserControl that already has a header so I would like to dynamically hide the header of the TileViewItem, but only for the Maximized Item. I assume that I need to get a reference to one of the following TileViewItem template elements:

    <Grid MinHeight="28">
        <Border x:Name="GripBarElement" Background="Transparent">
            <ContentPresenter x:Name="HeaderElement" HorizontalAlignment="Left"/>

    I plan to include my own button in the user control's header to use for minimeze (on click, manually change the state of maximized tileview item).

    For the other 2 states (Restored and Minimized) the default header should remain as it allows rearranging, maximize on dbl-click and offers the default buttons (useful in these 2 states).

    Can you please show me how can I achieve the following
    - how to access the header element in my own application (code)
    - where is the proper place to hide the header. (what event of the RadTileView)

    Thank you.
  2. Zarko
    Zarko avatar
    755 posts

    Posted 13 Jun 2011 Link to this post

    Hi mitica,
    Unfortunately there no straightforward way to access the header elements. You'll have to use the ChildrenOfType method and find them by name. I think that the easiest way to achieve your functionality will be to create a custom RadTileViewItem template with two headers - the default one for Restored and Minimized and one for when the item is Maximized. You can handle the TileStateChanged event of the RadTileView and in it depending on the state of the item you can collapse one of the headers.
    For further references could you please examine the attached project and if you have more questions feel free to ask.

    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 R3 2016 release webinar banner
  4. mitica
    mitica avatar
    7 posts
    Member since:
    May 2011

    Posted 14 Jun 2011 Link to this post

    Hello Zarko,

    thank you for your answer. It works like a charm.
    Very smart solution.

    Best regards,
Back to Top