|
1099 | 1099 | <DataTemplate x:DataType="filetags:TagViewModel"> |
1100 | 1100 | <UserControl PointerEntered="FileTag_PointerEntered" PointerExited="FileTag_PointerExited"> |
1101 | 1101 | <StackPanel |
| 1102 | + x:Name="TagPill" |
1102 | 1103 | Height="24" |
1103 | 1104 | Padding="8,0" |
1104 | 1105 | HorizontalAlignment="Left" |
1105 | 1106 | x:Phase="2" |
1106 | | - BorderBrush="{x:Bind Color, Mode=OneWay, Converter={StaticResource StringToBrushConverter}}" |
1107 | | - BorderThickness="1" |
1108 | 1107 | CornerRadius="12" |
1109 | 1108 | Orientation="Horizontal" |
| 1109 | + Spacing="8" |
1110 | 1110 | Tapped="TagItem_Tapped" |
1111 | 1111 | ToolTipService.ToolTip="{x:Bind Name, Mode=OneWay}"> |
1112 | | - <FontIcon |
1113 | | - x:Name="TagIcon" |
1114 | | - FontSize="12" |
1115 | | - Foreground="{x:Bind Color, Mode=OneWay, Converter={StaticResource StringToBrushConverter}}" |
1116 | | - Glyph="" |
1117 | | - Tapped="TagIcon_Tapped" |
1118 | | - ToolTipService.ToolTip="{helpers:ResourceString Name=Remove}" /> |
| 1112 | + <!-- Tag icon --> |
| 1113 | + <PathIcon |
| 1114 | + VerticalAlignment="Center" |
| 1115 | + Data="{StaticResource ColorIconFilledTag}" |
| 1116 | + Foreground="{x:Bind Color, Mode=OneWay, Converter={StaticResource StringToBrushConverter}}" /> |
| 1117 | + <!-- Tag name --> |
1119 | 1118 | <TextBlock |
1120 | 1119 | MaxWidth="200" |
1121 | | - Padding="8,0,0,0" |
1122 | 1120 | VerticalAlignment="Center" |
1123 | | - FontSize="12" |
1124 | | - LineHeight="18" |
1125 | 1121 | Style="{StaticResource ColumnContentTextBlock}" |
1126 | 1122 | Text="{x:Bind Name, Mode=OneWay}" |
1127 | 1123 | TextTrimming="CharacterEllipsis" /> |
1128 | | - |
| 1124 | + <!-- Remove tag icon --> |
| 1125 | + <FontIcon |
| 1126 | + x:Name="RemoveTagIcon" |
| 1127 | + VerticalAlignment="Center" |
| 1128 | + FontSize="12" |
| 1129 | + Glyph="" |
| 1130 | + Tapped="RemoveTagIcon_Tapped" |
| 1131 | + ToolTipService.ToolTip="{helpers:ResourceString Name=Remove}" |
| 1132 | + Visibility="Collapsed" /> |
1129 | 1133 | <VisualStateManager.VisualStateGroups> |
1130 | 1134 | <VisualStateGroup x:Name="CommonStates"> |
1131 | 1135 | <VisualState x:Name="Normal" /> |
1132 | 1136 |
|
1133 | 1137 | <VisualState x:Name="PointerOver"> |
1134 | 1138 | <VisualState.Setters> |
1135 | | - <Setter Target="TagIcon.Glyph" Value="" /> |
| 1139 | + <Setter Target="TagPill.Background" Value="{ThemeResource CardBackgroundFillColorDefault}" /> |
| 1140 | + <Setter Target="RemoveTagIcon.Visibility" Value="Visible" /> |
1136 | 1141 | </VisualState.Setters> |
1137 | 1142 | </VisualState> |
1138 | 1143 | </VisualStateGroup> |
|
0 commit comments