csharpc-sharpdotnetxamlavaloniauicross-platformcross-platform-xamlavaloniaguimulti-platformuser-interfacedotnetcore
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
71 lines
3.4 KiB
71 lines
3.4 KiB
<Styles xmlns="https://github.com/avaloniaui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
|
<Design.PreviewWith>
|
|
<Border Padding="20">
|
|
<AutoCompleteBox Width="200">
|
|
<AutoCompleteBox.Items>
|
|
Alabama
|
|
Alaska
|
|
Arizona
|
|
Arkansas
|
|
California
|
|
Colorado
|
|
Connecticut
|
|
Delaware
|
|
</AutoCompleteBox.Items>
|
|
</AutoCompleteBox>
|
|
</Border>
|
|
</Design.PreviewWith>
|
|
|
|
<Style Selector="AutoCompleteBox">
|
|
<Setter Property="VerticalAlignment" Value="Top" />
|
|
<Setter Property="Foreground" Value="{DynamicResource TextControlForeground}" />
|
|
<Setter Property="Background" Value="{DynamicResource TextControlBackground}" />
|
|
<Setter Property="BorderBrush" Value="{DynamicResource TextControlBorderBrush}" />
|
|
<Setter Property="BorderThickness" Value="{DynamicResource TextControlBorderThemeThickness}" />
|
|
<Setter Property="CornerRadius" Value="{DynamicResource ControlCornerRadius}" />
|
|
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
|
<Setter Property="Padding" Value="{DynamicResource TextControlThemePadding}" />
|
|
<Setter Property="MaxDropDownHeight" Value="{DynamicResource AutoCompleteListMaxHeight}" />
|
|
<Setter Property="Template">
|
|
<ControlTemplate>
|
|
<Grid Name="PART_LayoutRoot">
|
|
<TextBox Name="PART_TextBox"
|
|
Watermark="{TemplateBinding Watermark}"
|
|
Width="{TemplateBinding Width}"
|
|
Foreground="{TemplateBinding Foreground}"
|
|
Background="{TemplateBinding Background}"
|
|
BorderBrush="{TemplateBinding BorderBrush}"
|
|
BorderThickness="{TemplateBinding BorderThickness}"
|
|
CornerRadius="{TemplateBinding CornerRadius}"
|
|
FontSize="{TemplateBinding FontSize}"
|
|
FontFamily="{TemplateBinding FontFamily}"
|
|
FontWeight="{TemplateBinding FontWeight}"
|
|
Padding="{TemplateBinding Padding}"
|
|
Margin="0"
|
|
DataValidationErrors.Errors="{TemplateBinding (DataValidationErrors.Errors)}" />
|
|
|
|
<Popup Name="PART_Popup"
|
|
WindowManagerAddShadowHint="False"
|
|
MinWidth="{Binding Bounds.Width, RelativeSource={RelativeSource TemplatedParent}}"
|
|
MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
|
IsLightDismissEnabled="True"
|
|
PlacementTarget="{TemplateBinding}">
|
|
<Border Name="PART_SuggestionsContainer"
|
|
Padding="{DynamicResource AutoCompleteListMargin}"
|
|
BorderThickness="{DynamicResource AutoCompleteListBorderThemeThickness}"
|
|
BorderBrush="{DynamicResource AutoCompleteBoxSuggestionsListBorderBrush}"
|
|
Background="{DynamicResource AutoCompleteBoxSuggestionsListBackground}"
|
|
CornerRadius="{DynamicResource OverlayCornerRadius}">
|
|
<ListBox Name="PART_SelectingItemsControl"
|
|
BorderThickness="0"
|
|
Background="Transparent"
|
|
ItemTemplate="{TemplateBinding ItemTemplate}"
|
|
Margin="{DynamicResource AutoCompleteListPadding}" />
|
|
</Border>
|
|
</Popup>
|
|
</Grid>
|
|
</ControlTemplate>
|
|
</Setter>
|
|
</Style>
|
|
</Styles>
|
|
|