RadTileViewItem Header dissappearing when minimized

4 posts, 1 answers
  1. Jens Hobbie
    Jens Hobbie avatar
    15 posts
    Member since:
    Mar 2010

    Posted 21 Oct 2011 Link to this post

    Hello,
    I use RadTileView as a Prism Region and then inject views. View is derived from RadTileViewItem so I can define my custom Style, Header Template and Content Template. View is bound to a ViewModel which contains properties to bind Header (Title and Icon) and Content (for TileViewitem Content). For Content Template I use RadFluidContentControl and works fine. But I have a problem with HeaderTemplate. It’s very simple DataTemplate which contains: StackPanel with Image and TextBlock.


    <telerik:RadTileViewItem.HeaderTemplate>
    <DataTemplate>
        <StackPanel Orientation="Horizontal">
            <Image Source="{Binding IconPath}" Width="28" Height="28" VerticalAlignment="Center" Margin="0,3,0,3" />
            <TextBlock Text="{Binding Title}" FontWeight="Bold" Margin="5,0,0,0" FontSize="12" VerticalAlignment="Center"/>
        </StackPanel>
    </DataTemplate>
    </telerik:RadTileViewItem.HeaderTemplate>

    When view is registered first time, Header is displayed, but when I minimize RadTileViewItem, Header disappears and does not show again. Do you have any idea why?

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 26 Oct 2011 Link to this post

    Hello Jens Hobbie,

     Could you please examine this forum thread and the projects from Tina Stancheva and let us know if they help you? If not, is it possible for you to sends us a sample reproducing your issue? Thank you in advance.

    Greetings,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft banner
  4. Jens Hobbie
    Jens Hobbie avatar
    15 posts
    Member since:
    Mar 2010

    Posted 28 Oct 2011 Link to this post

    Hello Petar,
    We have already tried solutions from that forum thread, and they did not solve our problem. The difference is that in Tina Stancheva's samples they are injecting viewmodels into TielView, while we are injecting views (derived from TileViewItem).
    I have created a support ticket with sample project attached. Ticket ID is: 477790.
  5. Answer
    Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 01 Nov 2011 Link to this post

    Hello Jens Hobbie,

    I am glad that the solution I attached to your support thread fixed the issue. I will attach it here as well and I will post the same explanation in case anyone else encounters the same issues:

    Basically when a UI control is exposed as a region, a region adapter is used for creating a region and associating it to the control. Since the RadTileView is an ItemsControl the default ItemsControlRegionAdapter is used to control its behavior as a region in PRISM.

    However, this default RegionAdapter is causing the issue in your case and this is why you'll need to create a custom RegionAdapter. I modified your solution by adding a sample TileView RegionAdapter. Please have a look at it and let me know if it works for you.

    Regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top