Skip to content

Commit

Permalink
Update resouces, add test UI (#3435)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelwgn authored Oct 16, 2020
1 parent 93b328a commit 2341faa
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dev/ComboBox/ComboBox_themeresources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
<StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
<StaticResource x:Key="ComboBoxBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
<StaticResource x:Key="ComboBoxBackgroundFocused" ResourceKey="ComboBoxBackgroundUnfocused" />
<StaticResource x:Key="ComboBoxBackgroundBorderBrushFocused" ResourceKey="SystemControlHighlightTransparentBrush" />
<StaticResource x:Key="ComboBoxBackgroundBorderBrushUnfocused" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
<StaticResource x:Key="ComboBoxForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
Expand Down Expand Up @@ -165,6 +166,7 @@
<StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
<StaticResource x:Key="ComboBoxBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
<StaticResource x:Key="ComboBoxBackgroundFocused" ResourceKey="ComboBoxBackgroundUnfocused" />
<StaticResource x:Key="ComboBoxBackgroundBorderBrushFocused" ResourceKey="SystemControlHighlightTransparentBrush" />
<StaticResource x:Key="ComboBoxBackgroundBorderBrushUnfocused" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
<StaticResource x:Key="ComboBoxForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
Expand Down Expand Up @@ -300,6 +302,7 @@
<StaticResource x:Key="ComboBoxBackgroundPressed" ResourceKey="SystemControlBackgroundListMediumBrush" />
<StaticResource x:Key="ComboBoxBackgroundDisabled" ResourceKey="SystemControlBackgroundBaseLowBrush" />
<StaticResource x:Key="ComboBoxBackgroundUnfocused" ResourceKey="SystemControlHighlightListAccentLowBrush" />
<StaticResource x:Key="ComboBoxBackgroundFocused" ResourceKey="ComboBoxBackgroundUnfocused" />
<StaticResource x:Key="ComboBoxBackgroundBorderBrushFocused" ResourceKey="SystemControlHighlightTransparentBrush" />
<StaticResource x:Key="ComboBoxBackgroundBorderBrushUnfocused" ResourceKey="SystemControlHighlightBaseMediumLowBrush" />
<StaticResource x:Key="ComboBoxForeground" ResourceKey="SystemControlForegroundBaseHighBrush" />
Expand Down Expand Up @@ -504,6 +507,9 @@
Storyboard.TargetProperty="Opacity"
To="1"
Duration="0" />
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="Background">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundFocused}" />
</ObjectAnimationUsingKeyFrames>
<ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="BorderBrush">
<DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundBorderBrushFocused}" />
</ObjectAnimationUsingKeyFrames>
Expand Down
15 changes: 15 additions & 0 deletions dev/ComboBox/TestUI/ComboBoxPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,20 @@
<ComboBoxItem Content="Item 2"/>
<ComboBoxItem Content="Item 3"/>
</contract7Present:ComboBox>

<ComboBox SelectedIndex="0" Header="Focus resource lookup test">
<ComboBox.Resources>
<ResourceDictionary>
<SolidColorBrush x:Key="ComboBoxBackgroundFocused" Color="Green"/>
<SolidColorBrush x:Key="ComboBoxBackgroundUnfocused" Color="Red"/>
<SolidColorBrush x:Key="ComboBoxBackgroundBorderBrushFocused" Color="Blue"/>
<SolidColorBrush x:Key="ComboBoxBackgroundBorderBrushUnfocused" Color="Yellow"/>
</ResourceDictionary>
</ComboBox.Resources>
<ComboBoxItem Content="Item 1"/>
<ComboBoxItem Content="Item 2"/>
<ComboBoxItem Content="Item 3"/>
</ComboBox>

</StackPanel>
</local:TestPage>

0 comments on commit 2341faa

Please sign in to comment.