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!
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>