|
12 | 12 | <converters:TextFieldHintVisibilityConverter x:Key="TextFieldHintVisibilityConverter" IsNotEmptyValue="Collapsed" />
|
13 | 13 | <converters:MathConverter x:Key="MathAddConverter" Operation="Add" />
|
14 | 14 | <converters:BrushRoundConverter x:Key="BrushRoundConverter" />
|
| 15 | + |
| 16 | + <system:Double x:Key="PopupContentPresenterExtend">4</system:Double> |
| 17 | + <system:Double x:Key="PopupTopBottomMargin">8</system:Double> |
| 18 | + <system:Double x:Key="PopupLeftRightMargin">16</system:Double> |
15 | 19 |
|
16 | 20 | <Style x:Key="FocusVisual">
|
17 | 21 | <Setter Property="Control.Template">
|
|
27 | 31 | </Setter>
|
28 | 32 | </Style>
|
29 | 33 |
|
30 |
| - <system:Double x:Key="PopupContentPresenterExtend">4</system:Double> |
31 |
| - <system:Double x:Key="PopupTopBottomMargin">8</system:Double> |
32 |
| - <system:Double x:Key="PopupLeftRightMargin">16</system:Double> |
33 |
| - |
34 | 34 | <ControlTemplate x:Key="PopupContentUpTemplate" TargetType="ContentControl">
|
35 | 35 | <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}"
|
36 | 36 | Margin="6">
|
|
55 | 55 | </Grid.RowDefinitions>
|
56 | 56 | <Border Grid.Row="0"
|
57 | 57 | CornerRadius="2 2 0 0"
|
58 |
| - Background="{Binding ElementName=templateRoot, Path=Background}" |
| 58 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
59 | 59 | Height="{StaticResource PopupTopBottomMargin}"/>
|
60 | 60 | <ContentPresenter Grid.Row="1"/>
|
61 |
| - <Rectangle Grid.Row="2" |
62 |
| - Fill="{Binding ElementName=templateRoot, Path=Background}" |
63 |
| - Height="{StaticResource PopupContentPresenterExtend}"/> |
| 61 | + <Border Grid.Row="2" |
| 62 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
| 63 | + Height="{StaticResource PopupContentPresenterExtend}"/> |
64 | 64 |
|
65 | 65 | <Grid Grid.Row="3">
|
66 | 66 | <Grid.ColumnDefinitions>
|
67 | 67 | <ColumnDefinition Width="Auto"/>
|
68 | 68 | <ColumnDefinition Width="Auto"/>
|
69 | 69 | <ColumnDefinition Width="*"/>
|
70 | 70 | </Grid.ColumnDefinitions>
|
71 |
| - <Rectangle Grid.Column="0" |
72 |
| - Width="{StaticResource PopupLeftRightMargin}" |
73 |
| - Fill="{Binding ElementName=templateRoot, Path=Background}"/> |
| 71 | + <Border Grid.Column="0" |
| 72 | + Width="{StaticResource PopupLeftRightMargin}" |
| 73 | + Background="{Binding ElementName=PART_Popup, Path=Background}"/> |
74 | 74 | <Grid Grid.Column="1"
|
75 | 75 | Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type wpf:ComboBoxPopup}}, Path=VisiblePlacementWidth}"
|
76 | 76 | Height="{Binding ElementName=templateRoot, Path=ActualHeight}"/>
|
77 |
| - <Rectangle Grid.Column="2" |
78 |
| - MinWidth="{StaticResource PopupLeftRightMargin}" |
79 |
| - Fill="{Binding ElementName=templateRoot, Path=Background}"/> |
| 77 | + <Border Grid.Column="2" |
| 78 | + MinWidth="{StaticResource PopupLeftRightMargin}" |
| 79 | + Background="{Binding ElementName=PART_Popup, Path=Background}"/> |
80 | 80 | </Grid>
|
81 | 81 |
|
82 | 82 | <Border Grid.Row="4"
|
83 | 83 | CornerRadius="0 0 2 2"
|
84 | 84 | Height="{StaticResource PopupTopBottomMargin}"
|
85 |
| - Background="{Binding ElementName=templateRoot, Path=Background}" /> |
| 85 | + Background="{Binding ElementName=PART_Popup, Path=Background}" /> |
86 | 86 | </Grid>
|
87 | 87 | </Grid>
|
88 | 88 | </ControlTemplate>
|
|
112 | 112 | </Grid.RowDefinitions>
|
113 | 113 | <Border Grid.Row="0"
|
114 | 114 | CornerRadius="2 2 0 0"
|
115 |
| - Background="{Binding ElementName=templateRoot, Path=Background}" |
| 115 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
116 | 116 | Height="{StaticResource PopupTopBottomMargin}"/>
|
117 | 117 |
|
118 | 118 | <Grid Grid.Row="1">
|
|
121 | 121 | <ColumnDefinition Width="Auto"/>
|
122 | 122 | <ColumnDefinition Width="*"/>
|
123 | 123 | </Grid.ColumnDefinitions>
|
124 |
| - <Rectangle Grid.Column="0" |
125 |
| - Width="{StaticResource PopupLeftRightMargin}" |
126 |
| - Fill="{Binding ElementName=templateRoot, Path=Background}" |
| 124 | + <Border Grid.Column="0" |
| 125 | + Width="{StaticResource PopupLeftRightMargin}" |
| 126 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
127 | 127 | />
|
128 | 128 | <Grid Grid.Column="1"
|
129 | 129 | Width="{Binding RelativeSource={RelativeSource AncestorType={x:Type wpf:ComboBoxPopup}}, Path=VisiblePlacementWidth}"
|
130 | 130 | Height="{Binding ElementName=templateRoot, Path=ActualHeight}"/>
|
131 |
| - <Rectangle Grid.Column="2" |
132 |
| - MinWidth="{StaticResource PopupLeftRightMargin}" |
133 |
| - Fill="{Binding ElementName=templateRoot, Path=Background}" |
| 131 | + <Border Grid.Column="2" |
| 132 | + MinWidth="{StaticResource PopupLeftRightMargin}" |
| 133 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
134 | 134 | />
|
135 | 135 | </Grid>
|
136 | 136 |
|
137 |
| - <Rectangle Grid.Row="2" |
138 |
| - Fill="{Binding ElementName=templateRoot, Path=Background}" |
139 |
| - Height="{StaticResource PopupContentPresenterExtend}"/> |
| 137 | + <Border Grid.Row="2" |
| 138 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
| 139 | + Height="{StaticResource PopupContentPresenterExtend}"/> |
140 | 140 |
|
141 | 141 | <ContentPresenter Grid.Row="3"/>
|
142 | 142 |
|
143 | 143 | <Border Grid.Row="4"
|
144 | 144 | CornerRadius="0 0 2 2"
|
145 | 145 | Height="{StaticResource PopupTopBottomMargin}"
|
146 |
| - Background="{Binding ElementName=templateRoot, Path=Background}" /> |
| 146 | + Background="{Binding ElementName=PART_Popup, Path=Background}" /> |
147 | 147 | </Grid>
|
148 | 148 | </Grid>
|
149 | 149 | </ControlTemplate>
|
|
170 | 170 | </Grid.RowDefinitions>
|
171 | 171 | <Border Grid.Row="0"
|
172 | 172 | CornerRadius="2 2 0 0"
|
173 |
| - Background="{Binding ElementName=templateRoot, Path=Background}" |
174 |
| - Height="{StaticResource PopupTopBottomMargin}"/> |
| 173 | + Background="{Binding ElementName=PART_Popup, Path=Background}" |
| 174 | + Height="{StaticResource PopupTopBottomMargin}"/> |
175 | 175 |
|
176 | 176 | <ContentPresenter Grid.Row="1"/>
|
177 | 177 |
|
178 | 178 | <Border Grid.Row="2"
|
179 | 179 | CornerRadius="0 0 2 2"
|
180 | 180 | Height="{StaticResource PopupTopBottomMargin}"
|
181 |
| - Background="{Binding ElementName=templateRoot, Path=Background}" /> |
| 181 | + Background="{Binding ElementName=PART_Popup, Path=Background}" /> |
182 | 182 | </Grid>
|
183 | 183 | </Grid>
|
184 | 184 | </ControlTemplate>
|
|
441 | 441 | Visibility="{Binding Path=(wpf:TextFieldAssist.DecorationVisibility), RelativeSource={RelativeSource TemplatedParent}}"/>
|
442 | 442 |
|
443 | 443 | <wpf:ComboBoxPopup x:Name="PART_Popup"
|
444 |
| - AllowsTransparency="true" |
445 |
| - Focusable="False" |
446 |
| - HorizontalOffset="-11.5" |
447 |
| - IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
448 |
| - PlacementTarget="{Binding ElementName=templateRoot}" |
449 |
| - SnapsToDevicePixels="True" |
450 |
| - UseLayoutRounding="True" |
451 |
| - Placement="Custom" |
452 |
| - PopupAnimation="Fade" |
453 |
| - VerticalOffset="0" |
454 |
| - DefaultVerticalOffset="5" |
455 |
| - DownVerticalOffset="-15.5" |
456 |
| - UpVerticalOffset="15" |
457 |
| - UpContentTemplate="{StaticResource PopupContentUpTemplate}" |
458 |
| - DownContentTemplate="{StaticResource PopupContentDownTemplate}" |
459 |
| - DefaultContentTemplate="{StaticResource PopupContentDefaultTemplate}"> |
| 444 | + AllowsTransparency="true" |
| 445 | + Focusable="False" |
| 446 | + HorizontalOffset="-11.5" |
| 447 | + IsOpen="{Binding IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" |
| 448 | + PlacementTarget="{Binding ElementName=templateRoot}" |
| 449 | + SnapsToDevicePixels="True" |
| 450 | + UseLayoutRounding="True" |
| 451 | + Placement="Custom" |
| 452 | + PopupAnimation="Fade" |
| 453 | + VerticalOffset="0" |
| 454 | + DefaultVerticalOffset="5" |
| 455 | + DownVerticalOffset="-15.5" |
| 456 | + UpVerticalOffset="15" |
| 457 | + UpContentTemplate="{StaticResource PopupContentUpTemplate}" |
| 458 | + DownContentTemplate="{StaticResource PopupContentDownTemplate}" |
| 459 | + DefaultContentTemplate="{StaticResource PopupContentDefaultTemplate}"> |
460 | 460 | <ContentControl>
|
461 | 461 | <ScrollViewer MaxHeight="{TemplateBinding MaxDropDownHeight}"
|
462 |
| - Background="{TemplateBinding Background}"> |
| 462 | + Background="{Binding Background, ElementName=PART_Popup}"> |
463 | 463 | <ItemsPresenter x:Name="ItemsPresenter" KeyboardNavigation.DirectionalNavigation="Contained" />
|
464 | 464 | </ScrollViewer>
|
465 | 465 | </ContentControl>
|
|
525 | 525 |
|
526 | 526 | <Style x:Key="MaterialDesignComboBox" TargetType="{x:Type ComboBox}">
|
527 | 527 | <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
|
528 |
| - <Setter Property="Background" Value="{DynamicResource MaterialDesignPaper}"/> |
| 528 | + <Setter Property="Background" Value="Transparent"/> |
529 | 529 | <Setter Property="BorderBrush" Value="{DynamicResource MaterialDesignTextBoxBorder}"/>
|
530 | 530 | <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
|
531 | 531 | <Setter Property="BorderThickness" Value="0 0 0 1"/>
|
|
0 commit comments