現在、私はこのビジュアルを持っています:
境界線に一致し、アイテム間にスペースがあるホバー効果が必要です。
<ListBox Grid.Column="1" Grid.Row="0" Margin="5,0,0,0" Grid.RowSpan="2" ItemsSource="{Binding Programme.Versions, UpdateSourceTrigger=PropertyChanged}" MouseLeftButtonUp="ChangerVersion_MouseLeftButtonUp" Style="{StaticResource NoBorder}">
<!--<ListBox.ItemsPanel>
<ItemsPanelTemplate >
<WrapPanel IsItemsHost="True" Orientation="Vertical" />
</ItemsPanelTemplate>
</ListBox.ItemsPanel> -->
<ListBox.ItemContainerStyle >
<Style TargetType="ListBoxItem">
<!--<Setter Property="Margin" Value="0,0,0,2"/>
<Setter Property="Padding" Value="0"/>
<Setter Property="Cursor" Value="Hand"/>-->
</Style>
</ListBox.ItemContainerStyle>
<ListBox.ItemTemplate>
<DataTemplate DataType="bOs:VersionBO" >
<Border Padding="0" BorderThickness="1" BorderBrush="{DynamicResource Accent}" >
<Grid Cursor="Hand">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="7"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<Rectangle Grid.Column="0" Grid.Row="0" Grid.RowSpan="2" Fill="{DynamicResource Accent}" />
<TextBlock Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Background="{DynamicResource Accent}" Foreground="White" Margin="5" FontSize="18">
<TextBlock.Text>
<MultiBinding StringFormat="{}V{0}.{1}">
<Binding Path="Numero" />
<Binding Path="NumeroModification" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
<TextBlock Text="{Binding Description}" Grid.Column="2" Grid.Row="0" />
<Image Grid.Column="2" Grid.Row="0" Width="20" Margin="0,2,2,0" Visibility="{Binding Interdit, Converter={StaticResource BooleanToVisibilityConverter}}" Source="../Images/Icones/interdit.png" HorizontalAlignment="Right" />
<TextBlock Grid.Column="2" Grid.Row="1">
<TextBlock.Text>
<MultiBinding Converter="{StaticResource MultiValuesWithSeparatorConverter}">
<Binding Path="Langue.Libelle" />
<Binding Path="SousTitre" />
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</Grid>
</Border>
</DataTemplate>
</ListBox.ItemTemplate>
</ListBox>
を再定義するItemContainerStyle
と、ホバー効果が失われます。