feat: update AutoCompleteBox theme.
This commit is contained in:
parent
7762eff214
commit
ada894e456
@ -24,6 +24,26 @@
|
|||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</AutoCompleteBox.ItemTemplate>
|
</AutoCompleteBox.ItemTemplate>
|
||||||
</AutoCompleteBox>
|
</AutoCompleteBox>
|
||||||
|
<AutoCompleteBox
|
||||||
|
Classes="Large"
|
||||||
|
Items="{Binding States}"
|
||||||
|
ValueMemberBinding="{Binding Name, x:DataType=local:StateData}">
|
||||||
|
<AutoCompleteBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="local:StateData">
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</AutoCompleteBox.ItemTemplate>
|
||||||
|
</AutoCompleteBox>
|
||||||
|
<AutoCompleteBox
|
||||||
|
Classes="Small"
|
||||||
|
Items="{Binding States}"
|
||||||
|
ValueMemberBinding="{Binding Name, x:DataType=local:StateData}">
|
||||||
|
<AutoCompleteBox.ItemTemplate>
|
||||||
|
<DataTemplate DataType="local:StateData">
|
||||||
|
<TextBlock Text="{Binding Name}" />
|
||||||
|
</DataTemplate>
|
||||||
|
</AutoCompleteBox.ItemTemplate>
|
||||||
|
</AutoCompleteBox>
|
||||||
<AutoCompleteBox
|
<AutoCompleteBox
|
||||||
Classes="Bordered"
|
Classes="Bordered"
|
||||||
Items="{Binding States}"
|
Items="{Binding States}"
|
||||||
|
@ -12,6 +12,7 @@
|
|||||||
<Panel>
|
<Panel>
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
|
VerticalAlignment="Center"
|
||||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
Watermark="{TemplateBinding Watermark}" />
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
<Popup
|
<Popup
|
||||||
@ -46,6 +47,7 @@
|
|||||||
<Panel>
|
<Panel>
|
||||||
<TextBox
|
<TextBox
|
||||||
Name="PART_TextBox"
|
Name="PART_TextBox"
|
||||||
|
VerticalAlignment="Center"
|
||||||
Classes="Bordered"
|
Classes="Bordered"
|
||||||
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}"
|
||||||
Watermark="{TemplateBinding Watermark}" />
|
Watermark="{TemplateBinding Watermark}" />
|
||||||
@ -75,7 +77,15 @@
|
|||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^.Large /template/ TextBox">
|
||||||
|
<Setter Property="TextBox.MinHeight" Value="{DynamicResource AutoCompleteBoxLargeHeight}" />
|
||||||
|
</Style>
|
||||||
|
<Style Selector="^.Small /template/ TextBox">
|
||||||
|
<Setter Property="TextBox.MinHeight" Value="{DynamicResource AutoCompleteBoxSmallHeight}" />
|
||||||
|
</Style>
|
||||||
</ControlTheme>
|
</ControlTheme>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
@ -6,4 +6,7 @@
|
|||||||
<Thickness x:Key="AutoCompleteBoxPopupMargin">4</Thickness>
|
<Thickness x:Key="AutoCompleteBoxPopupMargin">4</Thickness>
|
||||||
<CornerRadius x:Key="AutoCompleteBoxPopupCornerRadius">6</CornerRadius>
|
<CornerRadius x:Key="AutoCompleteBoxPopupCornerRadius">6</CornerRadius>
|
||||||
<CornerRadius x:Key="AutoCompleteBoxCornerRadius">3</CornerRadius>
|
<CornerRadius x:Key="AutoCompleteBoxCornerRadius">3</CornerRadius>
|
||||||
|
<x:Double x:Key="AutoCompleteBoxDefaultHeight">30</x:Double>
|
||||||
|
<x:Double x:Key="AutoCompleteBoxSmallHeight">22</x:Double>
|
||||||
|
<x:Double x:Key="AutoCompleteBoxLargeHeight">38</x:Double>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
<ResourceDictionary
|
<ResourceDictionary xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
xmlns="https://github.com/avaloniaui"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
||||||
xmlns:sys="clr-namespace:System;assembly=System.Runtime">
|
|
||||||
<SolidColorBrush x:Key="TextBoxTextCaretBrush" Color="Black" />
|
<SolidColorBrush x:Key="TextBoxTextCaretBrush" Color="Black" />
|
||||||
|
|
||||||
<SolidColorBrush x:Key="TextBoxDefaultBorderBrush" Color="Transparent" />
|
<SolidColorBrush x:Key="TextBoxDefaultBorderBrush" Color="Transparent" />
|
||||||
@ -27,12 +24,12 @@
|
|||||||
<SolidColorBrush x:Key="TextBoxBorderedPointeroverBackground" Color="Transparent" />
|
<SolidColorBrush x:Key="TextBoxBorderedPointeroverBackground" Color="Transparent" />
|
||||||
<SolidColorBrush x:Key="TextBoxBorderedPointeroverBorderBrush" Color="#0062D6" />
|
<SolidColorBrush x:Key="TextBoxBorderedPointeroverBorderBrush" Color="#0062D6" />
|
||||||
|
|
||||||
<sys:Double x:Key="TextBoxDefaultHeight">30</sys:Double>
|
<x:Double x:Key="TextBoxDefaultHeight">30</x:Double>
|
||||||
<sys:Double x:Key="TextBoxSmallHeight">22</sys:Double>
|
<x:Double x:Key="TextBoxSmallHeight">22</x:Double>
|
||||||
<sys:Double x:Key="TextBoxLargeHeight">38</sys:Double>
|
<x:Double x:Key="TextBoxLargeHeight">38</x:Double>
|
||||||
<sys:Double x:Key="TextBoxWrapperDefaultHeight">32</sys:Double>
|
<x:Double x:Key="TextBoxWrapperDefaultHeight">32</x:Double>
|
||||||
<sys:Double x:Key="TextBoxWrapperSmallHeight">24</sys:Double>
|
<x:Double x:Key="TextBoxWrapperSmallHeight">24</x:Double>
|
||||||
<sys:Double x:Key="TextBoxWrapperLargeHeight">40</sys:Double>
|
<x:Double x:Key="TextBoxWrapperLargeHeight">40</x:Double>
|
||||||
|
|
||||||
<CornerRadius x:Key="TextBoxDefaultCornerRadius">3</CornerRadius>
|
<CornerRadius x:Key="TextBoxDefaultCornerRadius">3</CornerRadius>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user