fix: fix TreeComboBox ClearButton position.
This commit is contained in:
@@ -23,11 +23,11 @@
|
|||||||
<Setter Property="Cursor" Value="Hand" />
|
<Setter Property="Cursor" Value="Hand" />
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<ControlTemplate TargetType="u:TreeComboBox">
|
<ControlTemplate TargetType="u:TreeComboBox">
|
||||||
<Grid MinWidth="{TemplateBinding MinHeight}" ColumnDefinitions="Auto, *, Auto, Auto, Auto">
|
<Grid MinWidth="{TemplateBinding MinHeight}" ColumnDefinitions="Auto, *, Auto, Auto">
|
||||||
<Border
|
<Border
|
||||||
Name="Background"
|
Name="Background"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.ColumnSpan="5"
|
Grid.ColumnSpan="4"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}"
|
BorderBrush="{TemplateBinding BorderBrush}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
@@ -66,15 +66,8 @@
|
|||||||
</MultiBinding>
|
</MultiBinding>
|
||||||
</ContentPresenter.ContentTemplate>
|
</ContentPresenter.ContentTemplate>
|
||||||
</ContentPresenter>
|
</ContentPresenter>
|
||||||
<Button
|
|
||||||
Name="PART_ClearButton"
|
|
||||||
Grid.Column="2"
|
|
||||||
Command="{Binding $parent[u:TreeComboBox].Clear}"
|
|
||||||
IsVisible="False"
|
|
||||||
Theme="{DynamicResource InnerIconButton}"
|
|
||||||
Content="{DynamicResource IconButtonClearData}" />
|
|
||||||
<ContentPresenter
|
<ContentPresenter
|
||||||
Grid.Column="3"
|
Grid.Column="2"
|
||||||
Margin="0 0 8 0"
|
Margin="0 0 8 0"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
VerticalContentAlignment="Center"
|
VerticalContentAlignment="Center"
|
||||||
@@ -82,22 +75,28 @@
|
|||||||
Foreground="{DynamicResource TextBoxInnerForeground}"
|
Foreground="{DynamicResource TextBoxInnerForeground}"
|
||||||
IsVisible="{TemplateBinding InnerRightContent,
|
IsVisible="{TemplateBinding InnerRightContent,
|
||||||
Converter={x:Static ObjectConverters.IsNotNull}}" />
|
Converter={x:Static ObjectConverters.IsNotNull}}" />
|
||||||
<Panel
|
<Button
|
||||||
Grid.Column="4"
|
Name="PART_ClearButton"
|
||||||
Width="32"
|
Grid.Column="3"
|
||||||
Background="Transparent"
|
Command="{Binding $parent[u:TreeComboBox].Clear}"
|
||||||
IsHitTestVisible="True">
|
Margin="0,0,8,0"
|
||||||
<PathIcon
|
IsVisible="False"
|
||||||
x:Name="DropDownGlyph"
|
Theme="{DynamicResource InnerIconButton}"
|
||||||
Width="12"
|
Content="{DynamicResource IconButtonClearData}" />
|
||||||
Height="12"
|
|
||||||
Margin="0,0,10,0"
|
<PathIcon
|
||||||
HorizontalAlignment="Right"
|
x:Name="DropDownGlyph"
|
||||||
VerticalAlignment="Center"
|
Grid.Column="3"
|
||||||
Data="{DynamicResource ComboBoxIcon}"
|
Width="12"
|
||||||
Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
|
Height="12"
|
||||||
UseLayoutRounding="False" />
|
Margin="0,0,12,0"
|
||||||
</Panel>
|
HorizontalAlignment="Right"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Data="{DynamicResource ComboBoxIcon}"
|
||||||
|
Foreground="{DynamicResource ComboBoxIconDefaultForeground}"
|
||||||
|
UseLayoutRounding="False"
|
||||||
|
IsHitTestVisible="True" />
|
||||||
|
|
||||||
<Popup
|
<Popup
|
||||||
Name="{x:Static iri:PartNames.PART_Popup}"
|
Name="{x:Static iri:PartNames.PART_Popup}"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
@@ -147,6 +146,9 @@
|
|||||||
<Style Selector="^:pointerover /template/ Button#PART_ClearButton">
|
<Style Selector="^:pointerover /template/ Button#PART_ClearButton">
|
||||||
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNotNull}}"/>
|
||||||
</Style>
|
</Style>
|
||||||
|
<Style Selector="^:pointerover /template/ PathIcon#DropDownGlyph">
|
||||||
|
<Setter Property="IsVisible" Value="{Binding $parent[u:TreeComboBox].SelectionBoxItem, Converter={x:Static ObjectConverters.IsNull}}"/>
|
||||||
|
</Style>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style Selector="^.Large">
|
<Style Selector="^.Large">
|
||||||
|
|||||||
Reference in New Issue
Block a user