|
51 | 51 | CornerRadius="8" |
52 | 52 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
53 | 53 | VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
54 | | - IsVisible="{TemplateBinding IsChecked, Converter={StaticResource Boolean2BooleanReConverter}}" /> |
| 54 | + IsVisible="{TemplateBinding IsChecked, Converter={x:Static BoolConverters.Not}}" /> |
55 | 55 | <ContentPresenter Grid.Column="1" |
56 | 56 | Focusable="False" |
57 | 57 | HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
|
101 | 101 | BasedOn="{StaticResource RadioButtonBaseStyle}" |
102 | 102 | TargetType="RadioButton" /> |
103 | 103 |
|
104 | | - <ControlTheme x:Key="RadioButtonSameAsButtonBaseStyle" |
105 | | - BasedOn="{StaticResource ButtonBaseStyle}" |
106 | | - TargetType="RadioButton"> |
107 | | - <Setter Property="Template"> |
108 | | - <ControlTemplate> |
109 | | - <Panel> |
110 | | - <Border Background="{TemplateBinding Background}" |
111 | | - CornerRadius="{TemplateBinding CornerRadius}" /> |
112 | | - <Border BorderThickness="{TemplateBinding BorderThickness}" |
113 | | - BorderBrush="{TemplateBinding BorderBrush}" |
114 | | - CornerRadius="{TemplateBinding CornerRadius}"> |
115 | | - <StackPanel Orientation="Horizontal" |
116 | | - HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" |
117 | | - VerticalAlignment="{TemplateBinding VerticalContentAlignment}" |
118 | | - Margin="{TemplateBinding Padding}"> |
119 | | - <Path Width="{TemplateBinding hc:IconElement.Width}" |
120 | | - Height="{TemplateBinding hc:IconElement.Height}" |
121 | | - Fill="{TemplateBinding Foreground}" |
122 | | - IsVisible="{Binding Path=(hc:IconElement.Geometry), RelativeSource={RelativeSource TemplatedParent}, Converter={x:Static ObjectConverters.IsNotNull}}" |
123 | | - Stretch="Uniform" |
124 | | - Data="{TemplateBinding hc:IconElement.Geometry}" /> |
125 | | - <ContentPresenter RecognizesAccessKey="True" |
126 | | - VerticalAlignment="Center" |
127 | | - Content="{TemplateBinding Content}" |
128 | | - ContentTemplate="{TemplateBinding ContentTemplate}" |
129 | | - IsVisible="{Binding $self.Content, Converter={x:Static ObjectConverters.IsNotNull}}" |
130 | | - Margin="{Binding Path=(hc:IconElement.Geometry), RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource GeometrySpacingConverter}, ConverterParameter='6,0,0,0'}" /> |
131 | | - </StackPanel> |
132 | | - </Border> |
133 | | - <Border Margin="-1" |
134 | | - IsVisible="{TemplateBinding IsChecked}" |
135 | | - CornerRadius="{TemplateBinding CornerRadius}" |
136 | | - BorderThickness="4" |
137 | | - BorderBrush="{DynamicResource DarkMaskBrush}" /> |
138 | | - </Panel> |
139 | | - </ControlTemplate> |
140 | | - </Setter> |
141 | | - </ControlTheme> |
142 | | - |
143 | 104 | <ControlTheme x:Key="RadioButtonSameAsButtonDefault" |
144 | | - BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}" |
145 | | - TargetType="RadioButton"> |
146 | | - <Setter Property="Background" |
147 | | - Value="{DynamicResource RegionBrush}" /> |
148 | | - <Setter Property="Foreground" |
149 | | - Value="{DynamicResource PrimaryTextBrush}" /> |
150 | | - |
151 | | - <Style Selector="^:pointerover"> |
152 | | - <Setter Property="Background" |
153 | | - Value="{DynamicResource SecondaryRegionBrush}" /> |
154 | | - </Style> |
155 | | - |
156 | | - <Style Selector="^:pressed"> |
157 | | - <Setter Property="Background" |
158 | | - Value="{DynamicResource BorderBrush}" /> |
159 | | - </Style> |
160 | | - </ControlTheme> |
| 105 | + BasedOn="{StaticResource ToggleButtonDefault}" |
| 106 | + TargetType="RadioButton" /> |
161 | 107 |
|
162 | 108 | <ControlTheme x:Key="RadioButtonSameAsButtonDefault.Small" |
163 | | - BasedOn="{StaticResource RadioButtonSameAsButtonDefault}" |
164 | | - TargetType="RadioButton"> |
165 | | - <Setter Property="Height" |
166 | | - Value="20" /> |
167 | | - <Setter Property="Padding" |
168 | | - Value="6,1" /> |
169 | | - <Setter Property="hc:IconElement.Height" |
170 | | - Value="12" /> |
171 | | - </ControlTheme> |
| 109 | + BasedOn="{StaticResource ToggleButtonDefault.Small}" |
| 110 | + TargetType="RadioButton" /> |
172 | 111 |
|
173 | 112 | <ControlTheme x:Key="RadioButtonSameAsButtonPrimary" |
174 | | - BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}" |
175 | | - TargetType="RadioButton"> |
176 | | - <Setter Property="Background" |
177 | | - Value="{DynamicResource PrimaryBrush}" /> |
178 | | - <Setter Property="BorderBrush" |
179 | | - Value="{DynamicResource PrimaryBrush}" /> |
180 | | - </ControlTheme> |
| 113 | + BasedOn="{StaticResource ToggleButtonPrimary}" |
| 114 | + TargetType="RadioButton" /> |
181 | 115 |
|
182 | 116 | <ControlTheme x:Key="RadioButtonSameAsButtonPrimary.Small" |
183 | | - BasedOn="{StaticResource RadioButtonSameAsButtonPrimary}" |
184 | | - TargetType="RadioButton"> |
185 | | - <Setter Property="Height" |
186 | | - Value="20" /> |
187 | | - <Setter Property="Padding" |
188 | | - Value="6,1" /> |
189 | | - <Setter Property="hc:IconElement.Height" |
190 | | - Value="12" /> |
191 | | - </ControlTheme> |
| 117 | + BasedOn="{StaticResource ToggleButtonPrimary.Small}" |
| 118 | + TargetType="RadioButton" /> |
192 | 119 |
|
193 | 120 | <ControlTheme x:Key="RadioButtonSameAsButtonSuccess" |
194 | | - BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}" |
195 | | - TargetType="RadioButton"> |
196 | | - <Setter Property="Background" |
197 | | - Value="{DynamicResource SuccessBrush}" /> |
198 | | - <Setter Property="BorderBrush" |
199 | | - Value="{DynamicResource SuccessBrush}" /> |
200 | | - </ControlTheme> |
| 121 | + BasedOn="{StaticResource ToggleButtonSuccess}" |
| 122 | + TargetType="RadioButton" /> |
201 | 123 |
|
202 | 124 | <ControlTheme x:Key="RadioButtonSameAsButtonSuccess.Small" |
203 | | - BasedOn="{StaticResource RadioButtonSameAsButtonSuccess}" |
204 | | - TargetType="RadioButton"> |
205 | | - <Setter Property="Height" |
206 | | - Value="20" /> |
207 | | - <Setter Property="Padding" |
208 | | - Value="6,1" /> |
209 | | - <Setter Property="hc:IconElement.Height" |
210 | | - Value="12" /> |
211 | | - </ControlTheme> |
| 125 | + BasedOn="{StaticResource ToggleButtonSuccess.Small}" |
| 126 | + TargetType="RadioButton" /> |
212 | 127 |
|
213 | 128 | <ControlTheme x:Key="RadioButtonSameAsButtonInfo" |
214 | | - BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}" |
215 | | - TargetType="RadioButton"> |
216 | | - <Setter Property="Background" |
217 | | - Value="{DynamicResource InfoBrush}" /> |
218 | | - <Setter Property="BorderBrush" |
219 | | - Value="{DynamicResource InfoBrush}" /> |
220 | | - </ControlTheme> |
| 129 | + BasedOn="{StaticResource ToggleButtonInfo}" |
| 130 | + TargetType="RadioButton" /> |
221 | 131 |
|
222 | 132 | <ControlTheme x:Key="RadioButtonSameAsButtonInfo.Small" |
223 | | - BasedOn="{StaticResource RadioButtonSameAsButtonInfo}" |
224 | | - TargetType="RadioButton"> |
225 | | - <Setter Property="Height" |
226 | | - Value="20" /> |
227 | | - <Setter Property="Padding" |
228 | | - Value="6,1" /> |
229 | | - <Setter Property="hc:IconElement.Height" |
230 | | - Value="12" /> |
231 | | - </ControlTheme> |
| 133 | + BasedOn="{StaticResource ToggleButtonInfo.Small}" |
| 134 | + TargetType="RadioButton" /> |
232 | 135 |
|
233 | 136 | <ControlTheme x:Key="RadioButtonSameAsButtonWarning" |
234 | | - BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}" |
235 | | - TargetType="RadioButton"> |
236 | | - <Setter Property="Background" |
237 | | - Value="{DynamicResource WarningBrush}" /> |
238 | | - <Setter Property="BorderBrush" |
239 | | - Value="{DynamicResource WarningBrush}" /> |
240 | | - </ControlTheme> |
| 137 | + BasedOn="{StaticResource ToggleButtonWarning}" |
| 138 | + TargetType="RadioButton" /> |
241 | 139 |
|
242 | 140 | <ControlTheme x:Key="RadioButtonSameAsButtonWarning.Small" |
243 | | - BasedOn="{StaticResource RadioButtonSameAsButtonWarning}" |
244 | | - TargetType="RadioButton"> |
245 | | - <Setter Property="Height" |
246 | | - Value="20" /> |
247 | | - <Setter Property="Padding" |
248 | | - Value="6,1" /> |
249 | | - <Setter Property="hc:IconElement.Height" |
250 | | - Value="12" /> |
251 | | - </ControlTheme> |
| 141 | + BasedOn="{StaticResource ToggleButtonWarning.Small}" |
| 142 | + TargetType="RadioButton" /> |
252 | 143 |
|
253 | 144 | <ControlTheme x:Key="RadioButtonSameAsButtonDanger" |
254 | | - BasedOn="{StaticResource RadioButtonSameAsButtonBaseStyle}" |
255 | | - TargetType="RadioButton"> |
256 | | - <Setter Property="Background" |
257 | | - Value="{DynamicResource DangerBrush}" /> |
258 | | - <Setter Property="BorderBrush" |
259 | | - Value="{DynamicResource DangerBrush}" /> |
260 | | - </ControlTheme> |
| 145 | + BasedOn="{StaticResource ToggleButtonDanger}" |
| 146 | + TargetType="RadioButton" /> |
261 | 147 |
|
262 | 148 | <ControlTheme x:Key="RadioButtonSameAsButtonDanger.Small" |
263 | | - BasedOn="{StaticResource RadioButtonSameAsButtonDanger}" |
264 | | - TargetType="RadioButton"> |
265 | | - <Setter Property="Height" |
266 | | - Value="20" /> |
267 | | - <Setter Property="Padding" |
268 | | - Value="6,1" /> |
269 | | - <Setter Property="hc:IconElement.Height" |
270 | | - Value="12" /> |
271 | | - </ControlTheme> |
| 149 | + BasedOn="{StaticResource ToggleButtonDanger.Small}" |
| 150 | + TargetType="RadioButton" /> |
272 | 151 |
|
273 | 152 | <ControlTheme x:Key="RadioButtonIconBaseStyle" |
274 | 153 | BasedOn="{StaticResource ButtonBaseStyle}" |
|
0 commit comments