ItemTemplateSelector and ItemContainerStyleSelector working?

6 posts, 0 answers
  1. Bill
    Bill avatar
    5 posts
    Member since:
    Mar 2012

    Posted 07 Jun 2013 Link to this post

    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!
  2. Pavel Pavlov
    Admin
    Pavel Pavlov avatar
    2039 posts

    Posted 12 Jun 2013 Link to this post

    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.

  3. DevCraft banner
  4. Jean-François
    Jean-François avatar
    3 posts
    Member since:
    May 2009

    Posted 03 Jul 2014 in reply to Pavel Pavlov Link to this post

    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
  5. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 07 Jul 2014 Link to this post

    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.
     
  6. João
    João avatar
    1 posts
    Member since:
    Sep 2014

    Posted 02 Oct 2014 in reply to Yoan Link to this post

    Waiting...
  7. Yoan
    Admin
    Yoan avatar
    1070 posts

    Posted 06 Oct 2014 Link to this post

    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.

     
Back to Top
DevCraft banner