|
|
|
@ -1,5 +1,6 @@ |
|
|
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" |
|
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
|
|
xmlns:sys="using:System" |
|
|
|
x:ClassModifier="internal"> |
|
|
|
<Design.PreviewWith> |
|
|
|
<Border Padding="20"> |
|
|
|
@ -23,7 +24,8 @@ |
|
|
|
<CornerRadius x:Key="ComboBoxItemCornerRadius">3</CornerRadius> |
|
|
|
<x:Double x:Key="ComboBoxItemPillWidth">3</x:Double> |
|
|
|
<x:Double x:Key="ComboBoxItemPillHeight">16</x:Double> |
|
|
|
<x:Double x:Key="ComboBoxItemPillMinScale">0.625</x:Double> |
|
|
|
<x:Double x:Key="ComboBoxItemPillScaledHeight">10</x:Double> |
|
|
|
<sys:TimeSpan x:Key="ComboBoxItemScaleAnimationDuration">00:00:00.167</sys:TimeSpan> |
|
|
|
|
|
|
|
<ControlTheme TargetType="Rectangle" x:Key="ComboBoxItemPill"> |
|
|
|
<Setter Property="HorizontalAlignment" Value="Left" /> |
|
|
|
@ -58,7 +60,15 @@ |
|
|
|
Opacity="0" |
|
|
|
IsHitTestVisible="False" |
|
|
|
UseLayoutRounding="False" |
|
|
|
RenderTransform="scaleY(1)"/> |
|
|
|
RenderTransform="scaleY(1)"> |
|
|
|
<Rectangle.Transitions> |
|
|
|
<Transitions> |
|
|
|
<DoubleTransition Property="Height" |
|
|
|
Duration="{DynamicResource ComboBoxItemScaleAnimationDuration}" |
|
|
|
Easing="0,0,0,1"/> |
|
|
|
</Transitions> |
|
|
|
</Rectangle.Transitions> |
|
|
|
</Rectangle> |
|
|
|
<ContentPresenter Name="PART_ContentPresenter" |
|
|
|
Foreground="{TemplateBinding Foreground}" |
|
|
|
BackgroundSizing="InnerBorderEdge" |
|
|
|
@ -149,9 +159,7 @@ |
|
|
|
<Setter Property="Foreground" Value="{DynamicResource ComboBoxItemForegroundSelectedPressed}" /> |
|
|
|
</Style> |
|
|
|
<Style Selector="^:pressed /template/ Rectangle#Pill"> |
|
|
|
<Setter Property="RenderTransform" > |
|
|
|
<ScaleTransform ScaleY="{DynamicResource ComboBoxItemPillMinScale}" /> |
|
|
|
</Setter> |
|
|
|
<Setter Property="Height" Value="{DynamicResource ComboBoxItemPillScaledHeight}"/> |
|
|
|
</Style> |
|
|
|
</Style> |
|
|
|
</ControlTheme> |
|
|
|
|