-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a23c65
commit 9885b00
Showing
2 changed files
with
87 additions
and
0 deletions.
There are no files selected for viewing
86 changes: 86 additions & 0 deletions
86
src/ImeSense.Launchers.Belarus.Themes.Avalonia/Styles/ComboBoxItem.axaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<ResourceDictionary | ||
xmlns="https://github.com/avaloniaui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<Design.PreviewWith> | ||
<Border Padding="20"> | ||
<StackPanel Orientation="Vertical"> | ||
<ComboBoxItem>ComboBoxItem 1</ComboBoxItem> | ||
<ComboBoxItem>ComboBoxItem 2 long</ComboBoxItem> | ||
<ComboBoxItem IsSelected="True">ComboBoxItem 3</ComboBoxItem> | ||
<ComboBoxItem IsEnabled="False">ComboBoxItem 4</ComboBoxItem> | ||
<ComboBoxItem | ||
IsEnabled="False" | ||
IsSelected="True"> | ||
ComboBoxItem 5 | ||
</ComboBoxItem> | ||
</StackPanel> | ||
</Border> | ||
</Design.PreviewWith> | ||
|
||
<ControlTheme | ||
x:Key="{x:Type ComboBoxItem}" | ||
TargetType="ComboBoxItem"> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForeground}" /> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackground}" /> | ||
<Setter Property="Padding" Value="{DynamicResource ComboBoxItemThemePadding}" /> | ||
<Setter Property="HorizontalContentAlignment" Value="Stretch" /> | ||
|
||
<Setter Property="Template"> | ||
<ControlTemplate> | ||
<ContentPresenter | ||
x:Name="PART_ContentPresenter" | ||
Content="{TemplateBinding Content}" | ||
Padding="{TemplateBinding Padding}" | ||
HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" | ||
VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" | ||
Background="{TemplateBinding Background}" | ||
BorderBrush="{TemplateBinding BorderBrush}" | ||
BorderThickness="{TemplateBinding BorderThickness}" | ||
ContentTemplate="{TemplateBinding ContentTemplate}" | ||
CornerRadius="{TemplateBinding CornerRadius}" | ||
Foreground="{TemplateBinding Foreground}" /> | ||
</ControlTemplate> | ||
</Setter> | ||
|
||
<Style Selector="^:pointerover /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackgroundPointerOver}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushPointerOver}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundPointerOver}" /> | ||
</Style> | ||
<Style Selector="^:pressed /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackgroundPressed}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushPressed}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundPressed}" /> | ||
</Style> | ||
|
||
<Style Selector="^:selected"> | ||
<Style Selector="^ /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="LightGray" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelected}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundSelected}" /> | ||
</Style> | ||
|
||
<Style Selector="^:disabled /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedDisabled}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedDisabled}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedDisabled}" /> | ||
</Style> | ||
<Style Selector="^:pointerover /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedPointerOver}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedPointerOver}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedPointerOver}" /> | ||
</Style> | ||
<Style Selector="^:pressed /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackgroundSelectedPressed}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushSelectedPressed}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedPressed}" /> | ||
</Style> | ||
</Style> | ||
|
||
<Style Selector="^:disabled /template/ ContentPresenter"> | ||
<Setter Property="Background" Value="{DynamicResource ComboBoxItemBackgroundDisabled}" /> | ||
<Setter Property="BorderBrush" Value="{DynamicResource ComboBoxItemBorderBrushDisabled}" /> | ||
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundDisabled}" /> | ||
</Style> | ||
</ControlTheme> | ||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters