|
1 | 1 | <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
2 | 2 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | 3 | xmlns:controls="using:Microsoft.Toolkit.Uwp.UI.Controls" |
| 4 | + xmlns:primitives="using:Microsoft.Toolkit.Uwp.UI.Controls.Primitives" |
4 | 5 | xmlns:converters="using:Microsoft.Toolkit.Uwp.UI.Converters" |
5 | 6 | xmlns:ex="using:Microsoft.Toolkit.Uwp.UI.Extensions" |
6 | 7 | xmlns:localconverters="using:Microsoft.Toolkit.Uwp.UI.Controls.ColorPickerConverters"> |
|
107 | 108 | <RowDefinition Height="Auto" /> |
108 | 109 | <RowDefinition Height="*" /> |
109 | 110 | </Grid.RowDefinitions> |
110 | | - <controls:ColorPickerSlider x:Name="ColorSpectrumThirdDimensionSlider" |
111 | | - Grid.Row="1" |
112 | | - Grid.RowSpan="2" |
113 | | - Grid.Column="0" |
114 | | - Width="20" |
115 | | - Margin="0,0,12,0" |
116 | | - HorizontalAlignment="Center" |
117 | | - VerticalAlignment="Stretch" |
118 | | - BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource ContrastBrushConverter}, ConverterParameter={ThemeResource TextControlForeground}}" |
119 | | - Orientation="Vertical" /> |
| 111 | + <primitives:ColorPickerSlider x:Name="ColorSpectrumThirdDimensionSlider" |
| 112 | + Grid.Row="1" |
| 113 | + Grid.RowSpan="2" |
| 114 | + Grid.Column="0" |
| 115 | + Width="20" |
| 116 | + Margin="0,0,12,0" |
| 117 | + HorizontalAlignment="Center" |
| 118 | + VerticalAlignment="Stretch" |
| 119 | + DefaultForeground="{ThemeResource TextControlForeground}" |
| 120 | + Orientation="Vertical" /> |
120 | 121 | <!-- Keep in mind the spectrum is always HSV --> |
121 | 122 | <!-- This must also not be named 'ColorSpectrum' to differentiate from the base class --> |
122 | 123 | <ColorSpectrum x:Name="ColorSpectrumControl" |
|
136 | 137 | MinSaturation="{TemplateBinding MinSaturation}" |
137 | 138 | MinValue="{TemplateBinding MinValue}" |
138 | 139 | Shape="{TemplateBinding ColorSpectrumShape}" /> |
139 | | - <controls:ColorPickerSlider x:Name="ColorSpectrumAlphaSlider" |
140 | | - Grid.Row="1" |
141 | | - Grid.RowSpan="2" |
142 | | - Grid.Column="2" |
143 | | - Width="20" |
144 | | - Margin="12,0,0,0" |
145 | | - HorizontalAlignment="Center" |
146 | | - VerticalAlignment="Stretch" |
147 | | - AutomationProperties.Name="Alpha Channel" |
148 | | - BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource ContrastBrushConverter}, ConverterParameter={ThemeResource TextControlForeground}}" |
149 | | - Orientation="Vertical" /> |
| 140 | + <primitives:ColorPickerSlider x:Name="ColorSpectrumAlphaSlider" |
| 141 | + Grid.Row="1" |
| 142 | + Grid.RowSpan="2" |
| 143 | + Grid.Column="2" |
| 144 | + Width="20" |
| 145 | + Margin="12,0,0,0" |
| 146 | + HorizontalAlignment="Center" |
| 147 | + VerticalAlignment="Stretch" |
| 148 | + AutomationProperties.Name="Alpha Channel" |
| 149 | + DefaultForeground="{ThemeResource TextControlForeground}" |
| 150 | + Orientation="Vertical" /> |
150 | 151 | </Grid> |
151 | 152 | </controls:Case> |
152 | 153 | <controls:Case Value="PaletteListBoxItem"> |
|
274 | 275 | VerticalAlignment="Center" |
275 | 276 | AutomationProperties.Name="Red Channel" |
276 | 277 | Style="{StaticResource InputTextBoxStyle}" /> |
277 | | - <controls:ColorPickerSlider x:Name="Channel1Slider" |
278 | | - Grid.Row="2" |
279 | | - Grid.Column="2" |
280 | | - Margin="12,0,0,0" |
281 | | - HorizontalAlignment="Stretch" |
282 | | - VerticalAlignment="Center" |
283 | | - AutomationProperties.Name="Red Channel" |
284 | | - BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource ContrastBrushConverter}, ConverterParameter={ThemeResource TextControlForeground}}" /> |
| 278 | + <primitives:ColorPickerSlider x:Name="Channel1Slider" |
| 279 | + Grid.Row="2" |
| 280 | + Grid.Column="2" |
| 281 | + Margin="12,0,0,0" |
| 282 | + HorizontalAlignment="Stretch" |
| 283 | + VerticalAlignment="Center" |
| 284 | + AutomationProperties.Name="Red Channel" |
| 285 | + DefaultForeground="{ThemeResource TextControlForeground}" /> |
285 | 286 | <!-- Channel 2 RGB:Green HSV:Saturation --> |
286 | 287 | <Border Grid.Row="3" |
287 | 288 | Grid.Column="0" |
|
304 | 305 | VerticalAlignment="Center" |
305 | 306 | AutomationProperties.Name="Green Channel" |
306 | 307 | Style="{StaticResource InputTextBoxStyle}" /> |
307 | | - <controls:ColorPickerSlider x:Name="Channel2Slider" |
308 | | - Grid.Row="3" |
309 | | - Grid.Column="2" |
310 | | - Margin="12,0,0,0" |
311 | | - HorizontalAlignment="Stretch" |
312 | | - VerticalAlignment="Center" |
313 | | - AutomationProperties.Name="Green Channel" |
314 | | - BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource ContrastBrushConverter}, ConverterParameter={ThemeResource TextControlForeground}}" /> |
| 308 | + <primitives:ColorPickerSlider x:Name="Channel2Slider" |
| 309 | + Grid.Row="3" |
| 310 | + Grid.Column="2" |
| 311 | + Margin="12,0,0,0" |
| 312 | + HorizontalAlignment="Stretch" |
| 313 | + VerticalAlignment="Center" |
| 314 | + AutomationProperties.Name="Green Channel" |
| 315 | + DefaultForeground="{ThemeResource TextControlForeground}" /> |
315 | 316 | <!-- Channel 3 RGB:Blue HSV:Value --> |
316 | 317 | <Border Grid.Row="4" |
317 | 318 | Grid.Column="0" |
|
334 | 335 | VerticalAlignment="Center" |
335 | 336 | AutomationProperties.Name="Blue Channel" |
336 | 337 | Style="{StaticResource InputTextBoxStyle}" /> |
337 | | - <controls:ColorPickerSlider x:Name="Channel3Slider" |
338 | | - Grid.Row="4" |
339 | | - Grid.Column="2" |
340 | | - Margin="12,0,0,0" |
341 | | - HorizontalAlignment="Stretch" |
342 | | - VerticalAlignment="Center" |
343 | | - AutomationProperties.Name="Blue Channel" |
344 | | - BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource ContrastBrushConverter}, ConverterParameter={ThemeResource TextControlForeground}}" /> |
| 338 | + <primitives:ColorPickerSlider x:Name="Channel3Slider" |
| 339 | + Grid.Row="4" |
| 340 | + Grid.Column="2" |
| 341 | + Margin="12,0,0,0" |
| 342 | + HorizontalAlignment="Stretch" |
| 343 | + VerticalAlignment="Center" |
| 344 | + AutomationProperties.Name="Blue Channel" |
| 345 | + DefaultForeground="{ThemeResource TextControlForeground}" /> |
345 | 346 | <!-- Alpha channel --> |
346 | 347 | <Border x:Name="AlphaChannelBorder" |
347 | 348 | Grid.Row="5" |
|
365 | 366 | VerticalAlignment="Center" |
366 | 367 | AutomationProperties.Name="Alpha Channel" |
367 | 368 | Style="{StaticResource InputTextBoxStyle}" /> |
368 | | - <controls:ColorPickerSlider x:Name="AlphaChannelSlider" |
369 | | - Grid.Row="5" |
370 | | - Grid.Column="2" |
371 | | - Margin="12,0,0,0" |
372 | | - HorizontalAlignment="Stretch" |
373 | | - VerticalAlignment="Center" |
374 | | - AutomationProperties.Name="Alpha Channel" |
375 | | - BorderBrush="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Color, Converter={StaticResource ContrastBrushConverter}, ConverterParameter={ThemeResource TextControlForeground}}" /> |
| 369 | + <primitives:ColorPickerSlider x:Name="AlphaChannelSlider" |
| 370 | + Grid.Row="5" |
| 371 | + Grid.Column="2" |
| 372 | + Margin="12,0,0,0" |
| 373 | + HorizontalAlignment="Stretch" |
| 374 | + VerticalAlignment="Center" |
| 375 | + AutomationProperties.Name="Alpha Channel" |
| 376 | + DefaultForeground="{ThemeResource TextControlForeground}" /> |
376 | 377 | </Grid> |
377 | 378 | </controls:Case> |
378 | 379 | </controls:SwitchPresenter> |
|
0 commit comments