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

RadTileViewItem Header dissappearing when minimized

3 Answers 103 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Jens Hobbie
Top achievements
Rank 1
Jens Hobbie asked on 21 Oct 2011, 01:57 PM

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?

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 26 Oct 2011, 12:31 PM
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 >>

0
Jens Hobbie
Top achievements
Rank 1
answered on 28 Oct 2011, 09:41 AM
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.
0
Accepted
Tina Stancheva
Telerik team
answered on 01 Nov 2011, 03:49 PM
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 >>

Tags
TileView
Asked by
Jens Hobbie
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Jens Hobbie
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or