feat: add selected item template. make sure mouse click works.

This commit is contained in:
rabbitism
2024-03-27 22:05:26 +08:00
parent 2c2fc63633
commit 1b7ed16ca9
5 changed files with 16 additions and 4 deletions

View File

@@ -50,6 +50,7 @@
HorizontalScrollBarVisibility="Disabled">
<u:MultiComboBoxSelectedItemList
VerticalAlignment="Center"
ItemTemplate="{TemplateBinding SelectedItemTemplate}"
ItemsSource="{TemplateBinding SelectedItems}"
RemoveCommand="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Remove}">
<ItemsControl.ItemsPanel>

View File

@@ -121,11 +121,12 @@
Data="{DynamicResource ClosableTagCloseIconGlyph}"
DockPanel.Dock="Right"
Foreground="{TemplateBinding Foreground}" />
<TextBlock
<ContentPresenter
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
FontSize="12"
Foreground="{TemplateBinding Foreground}"
Text="{TemplateBinding Content}"
Content="{TemplateBinding Content}"
ContentTemplate="{TemplateBinding ContentTemplate}"
TextTrimming="CharacterEllipsis" />
</DockPanel>
</Border>