Closed micah686 closed 4 years ago
I've reproduced this bug,
You're replacing the style of Adonis with your own style, which is based on DefaultListViewItem
style.
try adding BasedOn="{StaticResource {x:Type ListViewItem}}"
, this works for me.
<ListView.ItemContainerStyle>
<Style TargetType="ListViewItem" BasedOn="{StaticResource {x:Type ListViewItem}}">
<Setter Property="Focusable" Value="false" />
</Style>
</ListView.ItemContainerStyle>
Thank you for clearing this up @rasyidf.
Indeed, when you use your own style at any point of an application, you have to specify explicitly that it should be derived from the default style of Adonis UI. Unfortunately this is necessary. If the BasedOn
statement is missing the style will be based on WPF's default style which has no idea of Adonis UI's theming and thus looks weird.
PS: There is a little typo in the code block at {StaticResource** {x:Type ListViewItem}}
. The asterisks have to be removed in order to compile.
Describe the bug If you disable the focusable element of the listview, the items you hover over have the default windows blue-white selection bar..
To Reproduce Steps to reproduce the behavior: 1)Add the focusable element to an existing ListView code, as shown below:
Expected behavior The ListViewItems would not show a change on hover or click
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.