Normal
1. Create a screen tag (this is always that):[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"></Screen>[/COLOR][/CODE]2. The screen can only create one component, for example i use a DockPanel:[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> [COLOR="SandyBrown"]<DockPanel> </DockPanel>[/COLOR]</Screen>[/COLOR][/CODE]3. Inside it use a ListViewItem:Style="{ThemeResource ListViewStyle}" must be used in ListView ? to use the display of the current theme ?[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DockPanel> [COLOR="SandyBrown"]<ListView Style="{ThemeResource ListViewStyle}"> <ListViewItem> <Label Content="Choice 1"/> </ListViewItem> <ListViewItem> <Label Content="Choice 2"/> </ListViewItem> <ListViewItem> <Label Content="Choice 3"/> </ListViewItem> </ListView>[/COLOR] </DockPanel></Screen>[/COLOR][/CODE]Now nothing work ... I think this is because you must "inherit" from skin stuff4. Add Ressources[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <DockPanel> [COLOR="SandyBrown"]<DockPanel.Resources> <DataTemplate x:Key="ItemDataTemplate"> <Label x:Name="ItemDataLabel" Content="{Binding}" FontSize="{ThemeResource SmallFontSize}" Color="Blue"/> </DataTemplate> <Style x:Key="ListViewStyle" BasedOn="{ThemeResource DefaultListViewStyle}"> <Setter Property="ItemTemplate" Value="{ThemeResource ItemDataTemplate}"/> <Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/> </Style> </DockPanel.Resources>[/COLOR] <ListView Style="{ThemeResource ListViewStyle}"> <ListViewItem> <Label Content="Choice 1"/> </ListViewItem> <ListViewItem> <Label Content="Choice 2"/> </ListViewItem> <ListViewItem> <Label Content="Choice 3"/> </ListViewItem> </ListView> </DockPanel></Screen>[/COLOR][/CODE]Wow! I can press up and down of the keyboard or use the mouse and if I create a lot of items, there is a scroolbar!I don't understand very well the Ressources process.Someone have any doc for this and why the ListView isn't display without style ?
1. Create a screen tag (this is always that):
[CODE][COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</Screen>[/COLOR][/CODE]
2. The screen can only create one component, for example i use a DockPanel:
[COLOR="SandyBrown"]<DockPanel>
</DockPanel>[/COLOR]
3. Inside it use a ListViewItem:
Style="{ThemeResource ListViewStyle}" must be used in ListView ? to use the display of the current theme ?
<DockPanel>
[COLOR="SandyBrown"]<ListView Style="{ThemeResource ListViewStyle}">
<ListViewItem> <Label Content="Choice 1"/> </ListViewItem>
<ListViewItem> <Label Content="Choice 2"/> </ListViewItem>
<ListViewItem> <Label Content="Choice 3"/> </ListViewItem>
</ListView>[/COLOR]
</DockPanel>
Now nothing work ... I think this is because you must "inherit" from skin stuff
4. Add Ressources
[COLOR="SandyBrown"]<DockPanel.Resources>
<DataTemplate x:Key="ItemDataTemplate">
<Label x:Name="ItemDataLabel" Content="{Binding}" FontSize="{ThemeResource SmallFontSize}" Color="Blue"/>
</DataTemplate>
<Style x:Key="ListViewStyle" BasedOn="{ThemeResource DefaultListViewStyle}">
<Setter Property="ItemTemplate" Value="{ThemeResource ItemDataTemplate}"/>
<Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/>
</Style>
</DockPanel.Resources>[/COLOR]
<ListView Style="{ThemeResource ListViewStyle}">
</ListView>
Wow! I can press up and down of the keyboard or use the mouse and if I create a lot of items, there is a scroolbar!
I don't understand very well the Ressources process.
Someone have any doc for this and why the ListView isn't display without style ?