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

ItemTemplateSelector and ItemContainerStyleSelector working?

5 Answers 149 Views
TileList
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 07 Jun 2013, 06:01 AM
Hi,

I cannot seem to get the ItemTemplateSelector and ItemContainerStyleSelector working. It never breaks into the Select overrides.

Does this look ok?

public class MyTileStyleSelector : StyleSelector
    {
        public override Style SelectStyle(object item, DependencyObject container)
        {
            //Never breaks inside here.
            return base.SelectStyle(item, container);
        }
    }

    public class MyTileDataTemplateSelector : DataTemplateSelector
    {
        public override DataTemplate SelectTemplate(object item, DependencyObject container)
        {
            //Never breaks inside here.
            return base.SelectTemplate(item, container);
        }
    }

<UserControl x:Class="RadControlsSilverlightApp1.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
        mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"
        xmlns:local="clr-namespace:RadControlsSilverlightApp1"
        x:Name="me">

    <UserControl.Resources>
        <local:MyTileStyleSelector x:Key="TileTypeStyleSelector"  />
        <local:MyTileDataTemplateSelector x:Key="TileTypeDataTemplateSelector"  />
    </UserControl.Resources>

    <Grid x:Name="LayoutRoot">
        <telerik:RadTileList ItemsSource="{Binding ElementName=me, Path=Data}" 
                             ItemTemplateSelector="{StaticResource ResourceKey=TileTypeDataTemplateSelector}"
                             ItemContainerStyleSelector="{StaticResource ResourceKey=TileTypeStyleSelector}" />
    </Grid>
</UserControl>

Thanks!

5 Answers, 1 is accepted

Sort by
0
Pavel Pavlov
Telerik team
answered on 12 Jun 2013, 07:57 AM
Hi Bill,

We are currently working on the implementation of Style and Template selectors for RadTileList. Indeed due to the fact we inherit ItemsControl , we have the properties. I believe in a few weeks we will be able to ship the functionality behind the properties as well.

Regards,
Pavel Pavlov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Jean-François
Top achievements
Rank 1
answered on 03 Jul 2014, 03:28 PM
Hi,
I tried to use an ItemContainerStyleSelector in a RadtileList with the version Q2 2014, but it does not work. Is there a solution for this?
Is there a workaround?

Thanks
0
Yoan
Telerik team
answered on 07 Jul 2014, 03:02 PM
Hello,

I am afraid that this functionality is not implemented with the current version of TileList. However, we are working on some improvements of the RadTileList control and we will research the opportunity of adding such functionality.

Regards,
Yoan
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
João
Top achievements
Rank 1
answered on 02 Oct 2014, 03:10 PM
Waiting...
0
Yoan
Telerik team
answered on 06 Oct 2014, 03:14 PM
Hi,

I am afraid that ItemContainerStyleSelector functionality is still not implemented. As for the ItemTemplateSelector, you can check this help article for a reference.

Regards,
Yoan
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
TileList
Asked by
Bill
Top achievements
Rank 1
Answers by
Pavel Pavlov
Telerik team
Jean-François
Top achievements
Rank 1
Yoan
Telerik team
João
Top achievements
Rank 1
Share this question
or