fix: fix margin when multi-auto has no left content. (#822)
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
<ResourceDictionary xmlns="https://github.com/avaloniaui"
|
<ResourceDictionary
|
||||||
|
xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:u="https://irihi.tech/ursa">
|
xmlns:u="https://irihi.tech/ursa">
|
||||||
<ControlTheme x:Key="{x:Type u:MultiAutoCompleteBox}" TargetType="u:MultiAutoCompleteBox">
|
<ControlTheme x:Key="{x:Type u:MultiAutoCompleteBox}" TargetType="u:MultiAutoCompleteBox">
|
||||||
@@ -12,31 +13,35 @@
|
|||||||
Name="PART_RootBorder"
|
Name="PART_RootBorder"
|
||||||
MinHeight="30"
|
MinHeight="30"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
CornerRadius="{TemplateBinding CornerRadius}"
|
|
||||||
Background="{DynamicResource TextBoxDefaultBackground}"
|
Background="{DynamicResource TextBoxDefaultBackground}"
|
||||||
BorderBrush="{DynamicResource TextBoxDefaultBorderBrush}">
|
BorderBrush="{DynamicResource TextBoxDefaultBorderBrush}"
|
||||||
|
CornerRadius="{TemplateBinding CornerRadius}">
|
||||||
<Grid ColumnDefinitions="Auto, *, Auto">
|
<Grid ColumnDefinitions="Auto, *, Auto">
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Margin="8,0"
|
Margin="8,0,0,0"
|
||||||
IsHitTestVisible="False"
|
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Content="{TemplateBinding InnerLeftContent}"
|
Content="{TemplateBinding InnerLeftContent}"
|
||||||
Foreground="{DynamicResource TextBoxInnerForeground}"
|
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||||
|
IsHitTestVisible="False"
|
||||||
IsVisible="{TemplateBinding InnerLeftContent,
|
IsVisible="{TemplateBinding InnerLeftContent,
|
||||||
Converter={x:Static ObjectConverters.IsNotNull}}" />
|
Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||||
<u:MultiComboBoxSelectedItemList
|
<u:MultiComboBoxSelectedItemList
|
||||||
Grid.Column="1"
|
|
||||||
Name="{x:Static u:MultiAutoCompleteBox.PART_SelectedItemsControl}"
|
Name="{x:Static u:MultiAutoCompleteBox.PART_SelectedItemsControl}"
|
||||||
|
Grid.Column="1"
|
||||||
|
Margin="8,0,0,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
RemoveCommand="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Remove}"
|
|
||||||
ItemTemplate="{TemplateBinding SelectedItemTemplate}"
|
ItemTemplate="{TemplateBinding SelectedItemTemplate}"
|
||||||
ItemsSource="{TemplateBinding SelectedItems}" >
|
ItemsSource="{TemplateBinding SelectedItems}"
|
||||||
|
RemoveCommand="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Remove}">
|
||||||
<u:MultiComboBoxSelectedItemList.ItemsPanel>
|
<u:MultiComboBoxSelectedItemList.ItemsPanel>
|
||||||
<ItemsPanelTemplate>
|
<ItemsPanelTemplate>
|
||||||
<u:WrapPanelWithTrailingItem>
|
<u:WrapPanelWithTrailingItem>
|
||||||
<u:WrapPanelWithTrailingItem.TrailingItem>
|
<u:WrapPanelWithTrailingItem.TrailingItem>
|
||||||
<TextBox VerticalAlignment="Center" MinWidth="24" Theme="{DynamicResource TagInputTextBoxTheme}"/>
|
<TextBox
|
||||||
|
MinWidth="24"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Theme="{DynamicResource TagInputTextBoxTheme}" />
|
||||||
</u:WrapPanelWithTrailingItem.TrailingItem>
|
</u:WrapPanelWithTrailingItem.TrailingItem>
|
||||||
</u:WrapPanelWithTrailingItem>
|
</u:WrapPanelWithTrailingItem>
|
||||||
</ItemsPanelTemplate>
|
</ItemsPanelTemplate>
|
||||||
@@ -46,9 +51,9 @@
|
|||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
Margin="8,0"
|
Margin="8,0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
IsHitTestVisible="False"
|
|
||||||
Content="{TemplateBinding InnerRightContent}"
|
Content="{TemplateBinding InnerRightContent}"
|
||||||
Foreground="{DynamicResource TextBoxInnerForeground}"
|
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||||
|
IsHitTestVisible="False"
|
||||||
IsVisible="{TemplateBinding InnerRightContent,
|
IsVisible="{TemplateBinding InnerRightContent,
|
||||||
Converter={x:Static ObjectConverters.IsNotNull}}" />
|
Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user