Normal
Based on the guitestplugin example (test-listview.xaml), I found that without using style it doesn't work.There is my working code:[CODE]<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Grid>[COLOR="DarkOrange"] <Grid.Resources> <Style x:Key="ListViewStyle" BasedOn="{ThemeResource DefaultListViewStyle}"> <Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/> </Style> </Grid.Resources>[/COLOR] <!-- Grid for positioning elements --> <Grid.RowDefinitions> <RowDefinition Height="60" /> <RowDefinition Height="*" /> <RowDefinition Height="40" /> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="380" /> <ColumnDefinition Width="*" /> </Grid.ColumnDefinitions> <!-- Main List --> <ListView Grid.Row="1" Grid.Column="1" Margin="0,20,20,20"[COLOR="DarkOrange"] Style="{ThemeResource ListViewStyle}[/COLOR]" > <ListViewItem> <WrapPanel> <Image Margin="0,0,14,0" Source="viewed.png" /> <Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="divx.png" /> <Label Content="Choix 1"/> </WrapPanel></ListViewItem> <ListViewItem> <WrapPanel> <Image Width="30" Margin="0,0,14,0" Source="inprogress.png" /> <Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="dvd.png" /> <Label Content="Choix 1"/> </WrapPanel></ListViewItem> </ListView> <!-- Cover --> <Image Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Right" Source="cover.png" /> </Grid></Screen>[/CODE]
Based on the guitestplugin example (test-listview.xaml), I found that without using style it doesn't work.
There is my working code:
[CODE]
<Screen xmlns="www.team-mediaportal.com/2008/mpf/directx" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
[COLOR="DarkOrange"] <Grid.Resources>
<Style x:Key="ListViewStyle" BasedOn="{ThemeResource DefaultListViewStyle}">
<Setter Property="ItemContainerStyle" Value="{ThemeResource DefaultMenuItemContainerStyle}"/>
</Style>
</Grid.Resources>[/COLOR]
<!-- Grid for positioning elements -->
<Grid.RowDefinitions>
<RowDefinition Height="60" />
<RowDefinition Height="*" />
<RowDefinition Height="40" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="380" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<!-- Main List -->
<ListView Grid.Row="1" Grid.Column="1" Margin="0,20,20,20"[COLOR="DarkOrange"] Style="{ThemeResource ListViewStyle}[/COLOR]" >
<ListViewItem> <WrapPanel>
<Image Margin="0,0,14,0" Source="viewed.png" />
<Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="divx.png" />
<Label Content="Choix 1"/>
</WrapPanel></ListViewItem>
<Image Width="30" Margin="0,0,14,0" Source="inprogress.png" />
<Image VerticalAlignment="Bottom" Margin="0,0,14,0" Source="dvd.png" />
</ListView>
<!-- Cover -->
<Image Grid.Row="1" Grid.Column="0" VerticalAlignment="Top" HorizontalAlignment="Right" Source="cover.png" />
</Grid>
</Screen>
[/CODE]