This is a migrated thread and some comments may be shown as answers.
Tiles disappear on customizing header
1 Answer 5 Views
This is a migrated thread and some comments may be shown as answers.
Usama
Top achievements
Rank 1
Usama asked on 04 Dec 2020, 10:05 AM

Hi, In my tile view, Items disappear when I apply style on headers of items.

As
---

 <Window.Resources>
        <Style x:Key="TileViewItemHeaderStyle" TargetType="tileView:TileViewItemHeader">
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="Background" Value="LightGray" />
        </Style>
        <Style x:Key="TileViewItemCustomStyle" TargetType="telerik:RadTileViewItem">
            <Setter Property="Header" Value="{Binding Title}" />
        </Style>
    </Window.Resources>

----

 <telerik:RadTileView                      
                        ItemsSource="{Binding Tiles}"
                        MinimizedItemsPosition="Bottom"  
                        HeaderStyle="{StaticResource TileViewItemHeaderStyle}" 
                        ItemContainerStyle="{StaticResource TileViewItemCustomStyle}"
                        MaximizedItem="{Binding MaximizedTile, Mode=TwoWay}"
                        PreservePositionWhenMaximized="True"
                        MinimizedColumnWidth="200"
                        MinimizedRowHeight="200">
                    </telerik:RadTileView>

---


However when I remove these lines 

HeaderStyle="{StaticResource TileViewItemHeaderStyle}" 
ItemContainerStyle="{StaticResource TileViewItemCustomStyle}"

 

Tiles aappear but obviously without custom 

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 08 Dec 2020, 11:15 PM

Hello Usama,

You can check the Missing Controls in the UI article and see if the solution suggested there helps. Basically, if you use NoXaml dlls, you will need to set the BasedOn property of the custom Telerik styles. Here is an example:

<Window.Resources>
	<Style x:Key="TileViewItemHeaderStyle" TargetType="tileView:TileViewItemHeader" BasedOn="{StaticResource TileViewItemHeaderStyle}">
		<Setter Property="Foreground" Value="Black"/>
		<Setter Property="Background" Value="LightGray" />
	</Style>
	<Style x:Key="TileViewItemCustomStyle" TargetType="telerik:RadTileViewItem" BasedOn="{StaticResource RadTileViewItemStyle}">
		<Setter Property="Header" Value="{Binding Title}" />
	</Style>
</Window.Resources>

Regards,
Martin Ivanov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Asked by
Usama
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Share this question
or