1. Create a screen tag (this is always that):
2. The screen can only create one component, for example i use a DockPanel:
3. Inside it use a ListViewItem:
Style="{ThemeResource ListViewStyle}" must be used in ListView ? to use the display of the current theme ?
Now nothing work ... I think this is because you must "inherit" from skin stuff
4. Add Ressources
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 ?
Code:
[COLOR="SeaGreen"]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
</Screen>[/COLOR]
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]
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]
Now nothing work ... I think this is because you must "inherit" from skin stuff
4. 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]
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 ?