|
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"> |
|
26 | 30 | </Setter.Value> |
27 | 31 | </Setter> |
28 | 32 | </Style> |
29 | | - |
30 | | - <system:Double x:Key="PopupLeftRightMargin">16</system:Double> |
31 | 33 |
|
32 | 34 | <ControlTemplate x:Key="PopupContentUpTemplate" TargetType="ContentControl"> |
33 | | - <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter={x:Static wpf:ComboBoxPopup.LeftRightMargin}}" |
| 35 | + <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}" |
34 | 36 | Margin="6"> |
35 | 37 | <Grid.RowDefinitions> |
36 | 38 | <RowDefinition Height="*" /> |
|
54 | 56 | <Border Grid.Row="0" |
55 | 57 | CornerRadius="2 2 0 0" |
56 | 58 | Background="{Binding ElementName=PART_Popup, Path=Background}" |
57 | | - Height="{x:Static wpf:ComboBoxPopup.TopBottomMargin}"/> |
| 59 | + Height="{StaticResource PopupTopBottomMargin}"/> |
58 | 60 | <ContentPresenter Grid.Row="1"/> |
59 | 61 | <Border Grid.Row="2" |
60 | 62 | Background="{Binding ElementName=PART_Popup, Path=Background}" |
61 | | - Height="{x:Static wpf:ComboBoxPopup.ContentPresenterExtend}"/> |
| 63 | + Height="{StaticResource PopupContentPresenterExtend}"/> |
62 | 64 |
|
63 | 65 | <Grid Grid.Row="3"> |
64 | 66 | <Grid.ColumnDefinitions> |
|
79 | 81 |
|
80 | 82 | <Border Grid.Row="4" |
81 | 83 | CornerRadius="0 0 2 2" |
82 | | - Height="{x:Static wpf:ComboBoxPopup.TopBottomMargin}" |
| 84 | + Height="{StaticResource PopupTopBottomMargin}" |
83 | 85 | Background="{Binding ElementName=PART_Popup, Path=Background}" /> |
84 | 86 | </Grid> |
85 | 87 | </Grid> |
86 | 88 | </ControlTemplate> |
87 | 89 |
|
88 | 90 | <ControlTemplate x:Key="PopupContentDownTemplate" TargetType="ContentControl"> |
89 | | - <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter={x:Static wpf:ComboBoxPopup.LeftRightMargin}}" |
| 91 | + <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}" |
90 | 92 | Margin="6"> |
91 | 93 | <Grid.RowDefinitions> |
92 | 94 | <RowDefinition Height="*" /> |
|
111 | 113 | <Border Grid.Row="0" |
112 | 114 | CornerRadius="2 2 0 0" |
113 | 115 | Background="{Binding ElementName=PART_Popup, Path=Background}" |
114 | | - Height="{x:Static wpf:ComboBoxPopup.TopBottomMargin}"/> |
| 116 | + Height="{StaticResource PopupTopBottomMargin}"/> |
115 | 117 |
|
116 | 118 | <Grid Grid.Row="1"> |
117 | 119 | <Grid.ColumnDefinitions> |
|
134 | 136 |
|
135 | 137 | <Border Grid.Row="2" |
136 | 138 | Background="{Binding ElementName=PART_Popup, Path=Background}" |
137 | | - Height="{x:Static wpf:ComboBoxPopup.ContentPresenterExtend}"/> |
| 139 | + Height="{StaticResource PopupContentPresenterExtend}"/> |
138 | 140 |
|
139 | 141 | <ContentPresenter Grid.Row="3"/> |
140 | 142 |
|
141 | 143 | <Border Grid.Row="4" |
142 | 144 | CornerRadius="0 0 2 2" |
143 | | - Height="{x:Static wpf:ComboBoxPopup.TopBottomMargin}" |
| 145 | + Height="{StaticResource PopupTopBottomMargin}" |
144 | 146 | Background="{Binding ElementName=PART_Popup, Path=Background}" /> |
145 | 147 | </Grid> |
146 | 148 | </Grid> |
147 | 149 | </ControlTemplate> |
148 | 150 |
|
149 | 151 | <ControlTemplate x:Key="PopupContentDefaultTemplate" TargetType="ContentControl"> |
150 | | - <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter={x:Static wpf:ComboBoxPopup.LeftRightMargin}}" |
| 152 | + <Grid MinWidth="{Binding ElementName=templateRoot, Path=ActualWidth, Converter={StaticResource MathAddConverter}, ConverterParameter=32}" |
151 | 153 | Margin="6"> |
152 | 154 | <Grid.RowDefinitions> |
153 | 155 | <RowDefinition Height="*" /> |
|
169 | 171 | <Border Grid.Row="0" |
170 | 172 | CornerRadius="2 2 0 0" |
171 | 173 | Background="{Binding ElementName=PART_Popup, Path=Background}" |
172 | | - Height="{x:Static wpf:ComboBoxPopup.TopBottomMargin}"/> |
| 174 | + Height="{StaticResource PopupTopBottomMargin}"/> |
173 | 175 |
|
174 | 176 | <ContentPresenter Grid.Row="1"/> |
175 | 177 |
|
176 | 178 | <Border Grid.Row="2" |
177 | 179 | CornerRadius="0 0 2 2" |
178 | | - Height="{x:Static wpf:ComboBoxPopup.TopBottomMargin}" |
| 180 | + Height="{StaticResource PopupTopBottomMargin}" |
179 | 181 | Background="{Binding ElementName=PART_Popup, Path=Background}" /> |
180 | 182 | </Grid> |
181 | 183 | </Grid> |
|
0 commit comments