Browse Source

style a bit focused dropdown item, so keyboard navigation is visible

Andrey Kunchev 7 years ago
parent
commit
c2c71105a4
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/Avalonia.Themes.Default/DropDownItem.xaml

+ 6 - 1
src/Avalonia.Themes.Default/DropDownItem.xaml

@@ -4,6 +4,7 @@
     <Setter Property="Padding" Value="2"/>
     <Setter Property="HorizontalAlignment" Value="Stretch"/>
     <Setter Property="HorizontalContentAlignment" Value="Left"/>
+    <Setter Property="BorderThickness" Value="1"/>
     <Setter Property="Template">
       <ControlTemplate>
         <ContentPresenter Name="PART_ContentPresenter"
@@ -18,7 +19,11 @@
       </ControlTemplate>
     </Setter>
   </Style>
-
+    
+  <Style Selector="DropDownItem:focus /template/ ContentPresenter">
+      <Setter Property="BorderBrush" Value="{DynamicResource ThemeAccentBrush3}"/>
+  </Style>
+    
   <Style Selector="DropDownItem:pointerover /template/ ContentPresenter">
     <Setter Property="Background" Value="{DynamicResource ThemeControlHighlightMidBrush}"/>
   </Style>