I have the following list in XAML:
<ListView Name="ListViewBack"
Margin="3"
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
ItemsPanel="{StaticResource IconListPanelTemplate}"
ItemTemplate="{StaticResource IconListDataTemplate}">
</ListView>
Now I would like to be able to change the ItemsPanel and ItemTemplate from the List to the Grid version. I've tried this using the following code:
ListViewBack.ItemsPanel = Resources["IconGridPanelTemplate"] as ItemsPanelTemplate;
ListViewBack.ItemTemplate = Resources["IconGridDataTemplate"] as DataTemplate;
But nothing happens when excecuted.
Any idea's?
Thanks!