|
52 | 52 | <Setter Property="Padding" Value="{DynamicResource ComboBoxItemThemePadding}" /> |
53 | 53 | <Setter Property="HorizontalContentAlignment" Value="Stretch" /> |
54 | 54 | <Setter Property="FocusVisualStyle" Value="{DynamicResource {x:Static SystemParameters.FocusVisualStyleKey}}" /> |
55 | | - <!--<Setter Property="FocusVisualStyle"> |
56 | | - <Setter.Value> |
57 | | - <Style> |
58 | | - <Setter Property="Control.Template"> |
59 | | - <Setter.Value> |
60 | | - <ControlTemplate> |
61 | | - <ikw:ClippedContent |
62 | | - BorderBrush="{DynamicResource SystemControlFocusVisualPrimaryBrush}" |
63 | | - BorderThickness="{TemplateBinding chelper:FocusVisualHelper.FocusVisualPrimaryThickness}" |
64 | | - SnapsToDevicePixels="True" |
65 | | - CornerRadius="6"> |
66 | | - <Border CornerRadius="6" |
67 | | - BorderBrush="{DynamicResource SystemControlFocusVisualSecondaryBrush}" |
68 | | - BorderThickness="{TemplateBinding chelper:FocusVisualHelper.FocusVisualSecondaryThickness}" /> |
69 | | - </ikw:ClippedContent> |
70 | | - </ControlTemplate> |
71 | | - </Setter.Value> |
72 | | - </Setter> |
73 | | - </Style> |
74 | | - </Setter.Value> |
75 | | - </Setter>--> |
76 | 55 | <Setter Property="chelper:FocusVisualHelper.FocusVisualMargin" Value="-3" /> |
77 | 56 | <Setter Property="chelper:FocusVisualHelper.UseSystemFocusVisuals" Value="True" /> |
78 | | - <!--<Setter Property="chelper:FocusVisualHelper.UseSystemFocusVisuals" Value="False" />--> |
79 | 57 | <Setter Property="chelper:ControlHelper.CornerRadius" Value="{DynamicResource ComboBoxItemCornerRadius}" /> |
80 | 58 | <Setter Property="Template"> |
81 | 59 | <Setter.Value> |
|
95 | 73 | Grid.Row="1" |
96 | 74 | Grid.Column="0" |
97 | 75 | Opacity="0" |
98 | | - RenderTransformOrigin="0.5,0.5" |
99 | 76 | Style="{StaticResource ComboBoxItemPill}"> |
100 | 77 | <Rectangle.RenderTransform> |
101 | 78 | <ScaleTransform x:Name="PillTransform" ScaleY="1" /> |
|
409 | 386 | Foreground="{DynamicResource ComboBoxHeaderForeground}" |
410 | 387 | SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" |
411 | 388 | TextWrapping="Wrap" |
| 389 | + LineHeight="20" |
412 | 390 | Visibility="{TemplateBinding chelper:ControlHelper.HeaderVisibility}" /> |
413 | 391 | <Border |
414 | 392 | x:Name="HighlightBackground" |
|
427 | 405 | Grid.Column="0" |
428 | 406 | Grid.ColumnSpan="2" |
429 | 407 | MinWidth="{DynamicResource ComboBoxThemeMinWidth}" |
| 408 | + chelper:FocusVisualHelper.IsTemplateFocusTarget="True" |
430 | 409 | chelper:ValidationHelper.IsTemplateValidationAdornerSite="True" |
431 | 410 | Background="{TemplateBinding Background}" |
432 | 411 | BorderBrush="{TemplateBinding BorderBrush}" |
433 | 412 | BorderThickness="{TemplateBinding BorderThickness}" |
434 | | - CornerRadius="{TemplateBinding chelper:ControlHelper.CornerRadius}" /> |
| 413 | + CornerRadius="{TemplateBinding chelper:ControlHelper.CornerRadius}" |
| 414 | + ElevationTransitionLength="1"/> |
435 | 415 | <Rectangle |
436 | 416 | x:Name="Pill" |
437 | 417 | Grid.Row="1" |
|
440 | 420 | Opacity="0" |
441 | 421 | Style="{StaticResource ComboBoxItemPill}"> |
442 | 422 | <Rectangle.RenderTransform> |
443 | | - <TranslateTransform x:Name="PillTransform" Y="1" /> |
| 423 | + <TransformGroup> |
| 424 | + <ScaleTransform x:Name="PillScaleTransform" ScaleY="1"/> |
| 425 | + <TranslateTransform x:Name="PillTransform" Y="1" /> |
| 426 | + </TransformGroup> |
444 | 427 | </Rectangle.RenderTransform> |
445 | 428 | </Rectangle> |
446 | 429 | <local:ContentPresenterEx |
447 | 430 | x:Name="ContentPresenter" |
448 | 431 | Grid.Row="1" |
449 | 432 | Grid.Column="0" |
| 433 | + Foreground="{TemplateBinding Foreground}" |
450 | 434 | Margin="{TemplateBinding Padding}" |
451 | 435 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
452 | 436 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
|
483 | 467 | Grid.ColumnSpan="2" |
484 | 468 | Margin="0,0,0,0" |
485 | 469 | Padding="{DynamicResource ComboBoxEditableTextPadding}" |
486 | | - HorizontalAlignment="Stretch" |
487 | | - VerticalAlignment="Stretch" |
488 | 470 | Foreground="{TemplateBinding Foreground}" |
489 | 471 | FontFamily="{TemplateBinding FontFamily}" |
490 | 472 | FontSize="{TemplateBinding FontSize}" |
491 | 473 | FontWeight="{TemplateBinding FontWeight}" |
492 | | - HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}" |
493 | | - VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" |
| 474 | + HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
| 475 | + VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
494 | 476 | chelper:ControlHelper.CornerRadius="{TemplateBinding chelper:ControlHelper.CornerRadius}" |
495 | 477 | chelper:ControlHelper.PlaceholderForeground="{TemplateBinding chelper:ControlHelper.PlaceholderForeground}" |
496 | 478 | chelper:ControlHelper.PlaceholderText="{TemplateBinding chelper:ControlHelper.PlaceholderText}" |
|
543 | 525 | Placement="Bottom" |
544 | 526 | PlacementTarget="{Binding ElementName=Background}" |
545 | 527 | PopupAnimation="None"> |
546 | | - <Popup.PlacementRectangle> |
| 528 | + <!--<Popup.PlacementRectangle> |
547 | 529 | <MultiBinding> |
548 | 530 | <MultiBinding.Converter> |
549 | 531 | <ikw:PlacementRectangleConverter Margin="0,1,0,1" /> |
550 | 532 | </MultiBinding.Converter> |
551 | 533 | <Binding ElementName="Background" Path="ActualWidth" /> |
552 | 534 | <Binding ElementName="Background" Path="ActualHeight" /> |
553 | 535 | </MultiBinding> |
554 | | - </Popup.PlacementRectangle> |
| 536 | + </Popup.PlacementRectangle>--> |
555 | 537 | <primitives:ThemeShadowChrome |
556 | 538 | x:Name="Shdw" |
557 | 539 | MinWidth="{Binding ActualWidth, ElementName=LayoutRoot}" |
|
591 | 573 | <Trigger Property="IsMouseOver" Value="True"> |
592 | 574 | <Setter TargetName="Background" Property="Background" Value="{DynamicResource ComboBoxBackgroundPointerOver}" /> |
593 | 575 | <Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrushPointerOver}" /> |
594 | | - <Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundPointerOver}" /> |
| 576 | + <Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource ComboBoxForegroundPointerOver}" /> |
595 | 577 | <Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundPointerOver}" /> |
596 | 578 | </Trigger> |
597 | 579 | <!-- Pressed --> |
598 | 580 | <Trigger SourceName="ToggleButton" Property="IsPressed" Value="True"> |
599 | 581 | <Setter TargetName="Background" Property="Background" Value="{DynamicResource ComboBoxBackgroundPressed}" /> |
600 | 582 | <Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrushPressed}" /> |
601 | | - <Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundPressed}" /> |
| 583 | + <Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource ComboBoxForegroundPressed}" /> |
602 | 584 | <Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundPressed}" /> |
603 | 585 | </Trigger> |
604 | 586 | <!-- Disabled --> |
605 | 587 | <Trigger Property="IsEnabled" Value="False"> |
606 | 588 | <Setter TargetName="Background" Property="Background" Value="{DynamicResource ComboBoxBackgroundDisabled}" /> |
607 | 589 | <Setter TargetName="Background" Property="BorderBrush" Value="{DynamicResource ComboBoxBorderBrushDisabled}" /> |
608 | 590 | <Setter TargetName="HeaderContentPresenter" Property="Foreground" Value="{DynamicResource ComboBoxHeaderForegroundDisabled}" /> |
609 | | - <Setter Property="Foreground" Value="{DynamicResource ComboBoxForegroundDisabled}" /> |
| 591 | + <Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource ComboBoxForegroundDisabled}" /> |
610 | 592 | <Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundDisabled}" /> |
611 | 593 | <Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxDropDownGlyphForegroundDisabled}" /> |
612 | 594 | </Trigger> |
|
627 | 609 | </MultiTrigger.Conditions> |
628 | 610 | <Setter TargetName="HighlightBackground" Property="Opacity" Value="1" /> |
629 | 611 | <Setter TargetName="Pill" Property="Opacity" Value="1" /> |
630 | | - <Setter TargetName="ContentPresenter" Property="TextElement.Foreground" Value="{DynamicResource ComboBoxForegroundFocusedPressed}" /> |
| 612 | + <Setter TargetName="ContentPresenter" Property="Foreground" Value="{DynamicResource ComboBoxForegroundFocusedPressed}" /> |
631 | 613 | <Setter TargetName="PlaceholderTextBlock" Property="Foreground" Value="{DynamicResource ComboBoxPlaceHolderForegroundFocusedPressed}" /> |
632 | 614 | <Setter TargetName="DropDownGlyph" Property="Foreground" Value="{DynamicResource ComboBoxDropDownGlyphForegroundFocusedPressed}" /> |
633 | 615 | </MultiTrigger> |
|
0 commit comments