Fix ColorPickerButton samples and switch to StackPanel
This is now the same as ColorPicker samples
This commit is contained in:
Родитель
dde93f33c8
Коммит
79f2931657
|
@ -10,19 +10,11 @@
|
||||||
<SolidColorBrush Color="{ThemeResource SystemChromeLowColor}" x:Key="SystemControlForegroundChromeLowBrush"/>
|
<SolidColorBrush Color="{ThemeResource SystemChromeLowColor}" x:Key="SystemControlForegroundChromeLowBrush"/>
|
||||||
</Page.Resources>
|
</Page.Resources>
|
||||||
|
|
||||||
<Grid>
|
<ScrollViewer>
|
||||||
<Grid.RowDefinitions>
|
<StackPanel Orientation="Vertical"
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
<RowDefinition Height="*" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<!-- Example 1 -->
|
|
||||||
<StackPanel Grid.Row="0"
|
|
||||||
Orientation="Vertical"
|
|
||||||
HorizontalAlignment="Center"
|
HorizontalAlignment="Center"
|
||||||
VerticalAlignment="Center"
|
|
||||||
Spacing="20">
|
Spacing="20">
|
||||||
|
<!-- Example 1 -->
|
||||||
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Height="100"
|
Height="100"
|
||||||
|
@ -44,13 +36,7 @@
|
||||||
</Style>
|
</Style>
|
||||||
</controls:ColorPickerButton.ColorPickerStyle>
|
</controls:ColorPickerButton.ColorPickerStyle>
|
||||||
</controls:ColorPickerButton>
|
</controls:ColorPickerButton>
|
||||||
</StackPanel>
|
<!-- Example 2 -->
|
||||||
<!-- Example 2 -->
|
|
||||||
<StackPanel Grid.Row="1"
|
|
||||||
Orientation="Vertical"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Spacing="20">
|
|
||||||
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Height="100"
|
Height="100"
|
||||||
|
@ -72,13 +58,7 @@
|
||||||
</Style>
|
</Style>
|
||||||
</controls:ColorPickerButton.ColorPickerStyle>
|
</controls:ColorPickerButton.ColorPickerStyle>
|
||||||
</controls:ColorPickerButton>
|
</controls:ColorPickerButton>
|
||||||
</StackPanel>
|
<!-- Example 3 -->
|
||||||
<!-- Example 3 -->
|
|
||||||
<StackPanel Grid.Row="2"
|
|
||||||
Orientation="Vertical"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Spacing="20">
|
|
||||||
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Height="100"
|
Height="100"
|
||||||
|
@ -100,13 +80,7 @@
|
||||||
</Style>
|
</Style>
|
||||||
</controls:ColorPickerButton.ColorPickerStyle>
|
</controls:ColorPickerButton.ColorPickerStyle>
|
||||||
</controls:ColorPickerButton>
|
</controls:ColorPickerButton>
|
||||||
</StackPanel>
|
<!-- Example 4 -->
|
||||||
<!-- Example 4 -->
|
|
||||||
<StackPanel Grid.Row="3"
|
|
||||||
Orientation="Vertical"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Spacing="20">
|
|
||||||
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Height="100"
|
Height="100"
|
||||||
|
@ -130,44 +104,32 @@
|
||||||
</Style>
|
</Style>
|
||||||
</controls:ColorPickerButton.ColorPickerStyle>
|
</controls:ColorPickerButton.ColorPickerStyle>
|
||||||
</controls:ColorPickerButton>
|
</controls:ColorPickerButton>
|
||||||
|
<!-- Example 5 -->
|
||||||
|
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
||||||
|
CornerRadius="4"
|
||||||
|
Height="100"
|
||||||
|
Width="300"
|
||||||
|
Padding="10">
|
||||||
|
<TextBlock TextAlignment="Center"
|
||||||
|
VerticalAlignment="Center">
|
||||||
|
Ring-shaped spectrum <LineBreak />
|
||||||
|
Alpha channel enabled <LineBreak />
|
||||||
|
Only Color Palette Shown
|
||||||
|
</TextBlock>
|
||||||
|
</Border>
|
||||||
|
<controls:ColorPickerButton x:Name="ColorPickerButton5"
|
||||||
|
SelectedColor="Teal">
|
||||||
|
<controls:ColorPickerButton.ColorPickerStyle>
|
||||||
|
<Style TargetType="controls:ColorPicker">
|
||||||
|
<Setter Property="ColorSpectrumShape" Value="Ring"/>
|
||||||
|
<Setter Property="IsAlphaEnabled" Value="True"/>
|
||||||
|
<Setter Property="IsHexInputVisible" Value="True"/>
|
||||||
|
<Setter Property="IsColorSpectrumVisible" Value="False"/>
|
||||||
|
<Setter Property="IsColorPaletteVisible" Value="True"/>
|
||||||
|
<Setter Property="IsColorChannelTextInputVisible" Value="False"/>
|
||||||
|
</Style>
|
||||||
|
</controls:ColorPickerButton.ColorPickerStyle>
|
||||||
|
</controls:ColorPickerButton>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
<!-- Example 5 -->
|
</ScrollViewer>
|
||||||
<StackPanel Grid.Row="3"
|
|
||||||
Orientation="Vertical"
|
|
||||||
HorizontalAlignment="Center"
|
|
||||||
VerticalAlignment="Center"
|
|
||||||
Spacing="20">
|
|
||||||
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
|
||||||
CornerRadius="4"
|
|
||||||
Height="100"
|
|
||||||
Width="300"
|
|
||||||
Padding="10">
|
|
||||||
<TextBlock TextAlignment="Center"
|
|
||||||
VerticalAlignment="Center">
|
|
||||||
Ring-shaped spectrum <LineBreak />
|
|
||||||
Alpha channel enabled <LineBreak />
|
|
||||||
Only Color Palette Shown
|
|
||||||
</TextBlock>
|
|
||||||
</Border>
|
|
||||||
<controls:ColorPickerButton x:Name="ColorPickerButton5"
|
|
||||||
SelectedColor="Teal">
|
|
||||||
<controls:ColorPickerButton.ColorPickerStyle>
|
|
||||||
<Style TargetType="controls:ColorPicker">
|
|
||||||
<Setter Property="ColorSpectrumShape"
|
|
||||||
Value="Ring"/>
|
|
||||||
<Setter Property="IsAlphaEnabled"
|
|
||||||
Value="True"/>
|
|
||||||
<Setter Property="IsHexInputVisible"
|
|
||||||
Value="True"/>
|
|
||||||
<Setter Property="IsColorSpectrumVisible"
|
|
||||||
Value="False"/>
|
|
||||||
<Setter Property="IsColorPaletteVisible"
|
|
||||||
Value="True"/>
|
|
||||||
<Setter Property="IsColorChannelTextInputVisible"
|
|
||||||
Value="False"/>
|
|
||||||
</Style>
|
|
||||||
</controls:ColorPickerButton.ColorPickerStyle>
|
|
||||||
</controls:ColorPickerButton>
|
|
||||||
</StackPanel>
|
|
||||||
</Grid>
|
|
||||||
</Page>
|
</Page>
|
|
@ -84,27 +84,27 @@
|
||||||
ColorSpectrumComponents="SaturationValue"
|
ColorSpectrumComponents="SaturationValue"
|
||||||
IsAlphaEnabled="True"
|
IsAlphaEnabled="True"
|
||||||
IsHexInputVisible="True"/>
|
IsHexInputVisible="True"/>
|
||||||
<!-- Example 5 -->
|
<!-- Example 5 -->
|
||||||
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
<Border Background="{ThemeResource SystemChromeMediumColor}"
|
||||||
CornerRadius="4"
|
CornerRadius="4"
|
||||||
Height="100"
|
Height="100"
|
||||||
Width="300"
|
Width="300"
|
||||||
Padding="10">
|
Padding="10">
|
||||||
<TextBlock TextAlignment="Center"
|
<TextBlock TextAlignment="Center"
|
||||||
VerticalAlignment="Center">
|
VerticalAlignment="Center">
|
||||||
Ring-shaped spectrum <LineBreak />
|
Ring-shaped spectrum <LineBreak />
|
||||||
Alpha channel enabled <LineBreak />
|
Alpha channel enabled <LineBreak />
|
||||||
Only Color Palette Shown
|
Only Color Palette Shown
|
||||||
</TextBlock>
|
</TextBlock>
|
||||||
</Border>
|
</Border>
|
||||||
<controls:ColorPicker x:Name="ColorPicker5"
|
<controls:ColorPicker x:Name="ColorPicker5"
|
||||||
Color="Teal"
|
Color="Teal"
|
||||||
ColorSpectrumShape="Ring"
|
ColorSpectrumShape="Ring"
|
||||||
IsAlphaEnabled="True"
|
IsAlphaEnabled="True"
|
||||||
IsHexInputVisible="True"
|
IsHexInputVisible="True"
|
||||||
IsColorSpectrumVisible="False"
|
IsColorSpectrumVisible="False"
|
||||||
IsColorPaletteVisible="True"
|
IsColorPaletteVisible="True"
|
||||||
IsColorChannelTextInputVisible="False"/>
|
IsColorChannelTextInputVisible="False"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</ScrollViewer>
|
</ScrollViewer>
|
||||||
</Page>
|
</Page>
|
Загрузка…
Ссылка в новой задаче