|
212 | 212 | Text="{Binding Path=(hc:TitleElement.Title), RelativeSource={RelativeSource TemplatedParent}}" /> |
213 | 213 | </DockPanel> |
214 | 214 | <DataValidationErrors Grid.Row="1"> |
215 | | - <Grid ColumnDefinitions="*,Auto"> |
| 215 | + <Grid ColumnDefinitions="*,Auto,Auto"> |
216 | 216 | <Border x:Name="border" |
217 | | - Grid.ColumnSpan="2" |
| 217 | + Grid.ColumnSpan="3" |
218 | 218 | CornerRadius="{TemplateBinding CornerRadius}" |
219 | 219 | BorderBrush="{TemplateBinding BorderBrush}" |
220 | 220 | BorderThickness="{TemplateBinding BorderThickness}" |
|
233 | 233 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
234 | 234 | ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" |
235 | 235 | VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" /> |
236 | | - <Path Grid.Column="1" |
237 | | - IsVisible="{TemplateBinding IsDropDownOpen, Converter={x:Static BoolConverters.Not}}" |
238 | | - Data="{StaticResource DownGeometry}" |
239 | | - VerticalAlignment="Center" |
240 | | - HorizontalAlignment="Right" |
241 | | - Width="14" |
242 | | - Stretch="Uniform" |
243 | | - Fill="{Binding BorderBrush, ElementName=border}" |
244 | | - Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
245 | | - <Path Grid.Column="1" |
246 | | - IsVisible="{TemplateBinding IsDropDownOpen}" |
247 | | - Data="{StaticResource UpGeometry}" |
248 | | - VerticalAlignment="Center" |
249 | | - HorizontalAlignment="Right" |
250 | | - Width="14" |
251 | | - Stretch="Uniform" |
252 | | - Fill="{Binding BorderBrush, ElementName=border}" |
253 | | - Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
| 236 | + <Button Grid.Column="1" |
| 237 | + HorizontalAlignment="Right" |
| 238 | + VerticalAlignment="Stretch" |
| 239 | + hc:IconElement.Width="14" |
| 240 | + Command="{Binding $parent[ComboBox].Clear}" |
| 241 | + Width="{x:Static system:Double.NaN}" |
| 242 | + Name="ButtonClear" |
| 243 | + Focusable="False" |
| 244 | + DockPanel.Dock="Right" |
| 245 | + Theme="{StaticResource ButtonIcon}" |
| 246 | + Padding="0,0,3,0" |
| 247 | + hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" |
| 248 | + Foreground="{Binding BorderBrush, ElementName=border}"> |
| 249 | + <Button.IsVisible> |
| 250 | + <MultiBinding Converter="{x:Static BoolConverters.And}"> |
| 251 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" |
| 252 | + Path="IsPointerOver" /> |
| 253 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" |
| 254 | + Path="(hc:InfoElement.ShowClearButton)" /> |
| 255 | + </MultiBinding> |
| 256 | + </Button.IsVisible> |
| 257 | + </Button> |
| 258 | + <Panel Grid.Column="2" |
| 259 | + Margin="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"> |
| 260 | + <Path IsVisible="{TemplateBinding IsDropDownOpen, Converter={x:Static BoolConverters.Not}}" |
| 261 | + Data="{StaticResource DownGeometry}" |
| 262 | + VerticalAlignment="Center" |
| 263 | + HorizontalAlignment="Right" |
| 264 | + Width="14" |
| 265 | + Stretch="Uniform" |
| 266 | + Fill="{Binding BorderBrush, ElementName=border}" |
| 267 | + Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
| 268 | + <Path IsVisible="{TemplateBinding IsDropDownOpen}" |
| 269 | + Data="{StaticResource UpGeometry}" |
| 270 | + VerticalAlignment="Center" |
| 271 | + HorizontalAlignment="Right" |
| 272 | + Width="14" |
| 273 | + Stretch="Uniform" |
| 274 | + Fill="{Binding BorderBrush, ElementName=border}" |
| 275 | + Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
| 276 | + </Panel> |
254 | 277 | <Popup Grid.Column="0" |
255 | 278 | Name="PART_Popup" |
256 | 279 | WindowManagerAddShadowHint="False" |
|
306 | 329 | Text="{Binding Path=(hc:TitleElement.Title), RelativeSource={RelativeSource TemplatedParent}}" /> |
307 | 330 | </DockPanel> |
308 | 331 | <DataValidationErrors Grid.Column="1"> |
309 | | - <Grid ColumnDefinitions="*,Auto"> |
| 332 | + <Grid ColumnDefinitions="*,Auto,Auto"> |
310 | 333 | <Border x:Name="border" |
311 | | - Grid.ColumnSpan="2" |
| 334 | + Grid.ColumnSpan="3" |
312 | 335 | CornerRadius="{TemplateBinding CornerRadius}" |
313 | 336 | BorderBrush="{TemplateBinding BorderBrush}" |
314 | 337 | BorderThickness="{TemplateBinding BorderThickness}" |
|
327 | 350 | HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
328 | 351 | ContentTemplate="{TemplateBinding SelectionBoxItemTemplate}" |
329 | 352 | VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" /> |
330 | | - <Path Grid.Column="1" |
331 | | - IsVisible="{TemplateBinding IsDropDownOpen, Converter={x:Static BoolConverters.Not}}" |
332 | | - Data="{StaticResource DownGeometry}" |
333 | | - VerticalAlignment="Center" |
334 | | - HorizontalAlignment="Right" |
335 | | - Width="14" |
336 | | - Stretch="Uniform" |
337 | | - Fill="{Binding BorderBrush, ElementName=border}" |
338 | | - Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
339 | | - <Path Grid.Column="1" |
340 | | - IsVisible="{TemplateBinding IsDropDownOpen}" |
341 | | - Data="{StaticResource UpGeometry}" |
342 | | - VerticalAlignment="Center" |
343 | | - HorizontalAlignment="Right" |
344 | | - Width="14" |
345 | | - Stretch="Uniform" |
346 | | - Fill="{Binding BorderBrush, ElementName=border}" |
347 | | - Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
| 353 | + <Button Grid.Column="1" |
| 354 | + HorizontalAlignment="Right" |
| 355 | + VerticalAlignment="Stretch" |
| 356 | + hc:IconElement.Width="14" |
| 357 | + Command="{Binding $parent[ComboBox].Clear}" |
| 358 | + Width="{x:Static system:Double.NaN}" |
| 359 | + Name="ButtonClear" |
| 360 | + Focusable="False" |
| 361 | + DockPanel.Dock="Right" |
| 362 | + Theme="{StaticResource ButtonIcon}" |
| 363 | + Padding="0,0,4,0" |
| 364 | + hc:IconElement.Geometry="{StaticResource DeleteFillCircleGeometry}" |
| 365 | + Foreground="{Binding BorderBrush, ElementName=border}"> |
| 366 | + <Button.IsVisible> |
| 367 | + <MultiBinding Converter="{x:Static BoolConverters.And}"> |
| 368 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" |
| 369 | + Path="IsPointerOver" /> |
| 370 | + <Binding RelativeSource="{RelativeSource TemplatedParent}" |
| 371 | + Path="(hc:InfoElement.ShowClearButton)" /> |
| 372 | + </MultiBinding> |
| 373 | + </Button.IsVisible> |
| 374 | + </Button> |
| 375 | + <Panel Grid.Column="2" |
| 376 | + Margin="{TemplateBinding BorderThickness, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}"> |
| 377 | + <Path IsVisible="{TemplateBinding IsDropDownOpen, Converter={x:Static BoolConverters.Not}}" |
| 378 | + Data="{StaticResource DownGeometry}" |
| 379 | + VerticalAlignment="Center" |
| 380 | + HorizontalAlignment="Right" |
| 381 | + Width="14" |
| 382 | + Stretch="Uniform" |
| 383 | + Fill="{Binding BorderBrush, ElementName=border}" |
| 384 | + Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
| 385 | + <Path IsVisible="{TemplateBinding IsDropDownOpen}" |
| 386 | + Data="{StaticResource UpGeometry}" |
| 387 | + VerticalAlignment="Center" |
| 388 | + HorizontalAlignment="Right" |
| 389 | + Width="14" |
| 390 | + Stretch="Uniform" |
| 391 | + Fill="{Binding BorderBrush, ElementName=border}" |
| 392 | + Margin="{TemplateBinding Padding, Converter={StaticResource ThicknessSplitConverter}, ConverterParameter='0,0,1,0'}" /> |
| 393 | + </Panel> |
348 | 394 | <Popup Grid.Column="0" |
349 | 395 | Name="PART_Popup" |
350 | 396 | WindowManagerAddShadowHint="False" |
|
0 commit comments