In version 14.2.7 this code functioned as expected, to fix an issue with the default theme where the foreground and background were both White.
<dxe:ListBoxEdit.ItemContainerStyle>
<Style BasedOn="{StaticResource {x:Type dxe:ListBoxEditItem}}" TargetType="{x:Type dxe:ListBoxEditItem}">
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsSelected" Value="True">
<Setter Property="Foreground" Value="White" />
</Trigger>
</Style.Triggers>
</Style>
</dxe:ListBoxEdit.ItemContainerStyle>
However once we upgraded to 14.2.8, only the HorizontalContentAlignment setter was being observed.
We had to change the ItemTemplate to facilitate the same behavior (while keeping the style for the horizontal alignment).
<dxe:ListBoxEdit.ItemTemplate>
<DataTemplate>
<TextBlock Text="{Binding}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBlock}">
<Style.Triggers>
<Trigger Property="IsMouseOver" Value="True">
<Setter Property="Foreground" Value="Black" />
</Trigger>
<Trigger Property="IsMouseOver" Value="False">
<Setter Property="Foreground" Value="Black" />
</Trigger>
<DataTrigger Binding="{Binding IsSelected, RelativeSource={RelativeSource AncestorType={x:Type dxe:ListBoxEditItem}}}" Value="True">
<Setter Property="Foreground" Value="White" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
</DataTemplate>
</dxe:ListBoxEdit.ItemTemplate>
This wasn't something listed in your breaking changes. Please fix. Thank you.
Hello,
I have reproduced this issue and forwarded it to our R&D team for further research. Follow our notifications to be informed about our progress.
As a workaround, you can set ListBoxEdit's AllowItemHighlighting property to "True". I have attached a sample project to demonstrate this approach.
Thanks,
Kirill
Any word? Or where are these notifications that which you speak of?
Hello Greg,
Our developers are working on the issue. As soon as we have any news, we will update this thread. We appreciate your understanding.
Thanks,
Andrey