Hi,
I'm following the example of RestoredTilesToSpanMultipleRowsAndColumns_WPF.
I want to define dynamic rows/columns. I tried the following:
<Style x:Key="tileViewPanel" TargetType="telerik:RadTileView"> <Style.Resources> <System:Object x:Key="RowsCount"/> <System:Object x:Key="ColumnsCount"/> </Style.Resources> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <local:Multicolumns RowsCount="{DynamicResource RowsCount}" ColumnsCount="{DynamicResource ColumnsCount}"/> </ItemsPanelTemplate> </Setter.Value> </Setter></Style>
Error:
System.Windows.Markup.XamlParseException: 'A 'DynamicResourceExtension' cannot be set on the 'RowsCount' property of type 'TemplateForm'. A 'DynamicResourceExtension' can only be set on a DependencyProperty of a DependencyObject.'
I also tried:
<Style x:Key="tileViewPanel" TargetType="telerik:RadTileView"> <Style.Resources> <System:Object x:Key="RowsCount"/> <System:Object x:Key="ColumnsCount"/> </Style.Resources> <Setter Property="ItemsPanel"> <Setter.Value> <ItemsPanelTemplate> <local:Multicolumns RowsCount="{Binding RowsCount}" ColumnsCount="{Binding ColumnsCount}"/> </ItemsPanelTemplate> </Setter.Value> </Setter> </Style>Error:
System.Windows.Markup.XamlParseException: 'A 'Binding' cannot be set on the 'RowsCount' property of type 'TemplateForm'. A 'Binding' can only be set on a DependencyProperty of a DependencyObject.'
Does anyone knows how i can define dynamic rows/columns for this example?
Regards
