Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ComboBox header not visible with some style editing #38

Open
touseefbsb opened this issue Mar 13, 2020 · 2 comments
Open

ComboBox header not visible with some style editing #38

touseefbsb opened this issue Mar 13, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@touseefbsb
Copy link

So I made a custom combo box style where the border wraps around the header as well as combobox content itself., it was working fine as expected and header was showing up fine, but then I opened "Fluent xaml theme editor" (uwp theme generator from store) and left it on default and exported the theme into my "app.xaml" and now header has disappeared. Below is the link to reproduce the issue, just open the project and run it and u will see on both light and dark theme there is no header on the combobox.

reproduce issue project : https://github.com/touseefbsb/ComboBoxThemeIssue
min target : 1803
target sdk : 1809/1903 ( 1809 shows header only in dark theme, 1903 doesnt show header in both themes )

Output

image

image

Code

MainPage

<Pivot>
        <PivotItem Header="Dropdowns">
            <PivotItem.Resources>
                <DataTemplate x:Key="dropdowns">
                    <StackPanel Background="{ThemeResource SystemAltHighColor}">
                        <ComboBox Header="Header">
                            <ComboBoxItem>123</ComboBoxItem>
                            <ComboBoxItem>456</ComboBoxItem>
                            <ComboBoxItem>789</ComboBoxItem>
                        </ComboBox>
                    </StackPanel>
                </DataTemplate>
            </PivotItem.Resources>
            <Pivot>
                <PivotItem Header="Light" RequestedTheme="Light">
                    <ContentControl ContentTemplate="{StaticResource dropdowns}" />
                </PivotItem>
                <PivotItem Header="Dark" RequestedTheme="Dark">
                    <ContentControl ContentTemplate="{StaticResource dropdowns}" />
                </PivotItem>
            </Pivot>
        </PivotItem>
    </Pivot>

App.xaml

<Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--  Free Public License 1.0.0 Permission to use, copy, modify, and/or distribute this code for any purpose with or without fee is hereby granted.  -->
                <ResourceDictionary
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:BelowWindows10version1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractNotPresent(Windows.Foundation.UniversalApiContract, 7)"
                    xmlns:Windows10version1809="http://schemas.microsoft.com/winfx/2006/xaml/presentation?IsApiContractPresent(Windows.Foundation.UniversalApiContract, 7)">
                    <ResourceDictionary.ThemeDictionaries>
                        <ResourceDictionary x:Key="Default">
                            <ResourceDictionary.MergedDictionaries>
                                <Windows10version1809:ColorPaletteResources
                                    Accent="#FF0073CF"
                                    AltHigh="#FF000000"
                                    AltLow="#FF000000"
                                    AltMedium="#FF000000"
                                    AltMediumHigh="#FF000000"
                                    AltMediumLow="#FF000000"
                                    BaseHigh="#FFFFFFFF"
                                    BaseLow="#FF333333"
                                    BaseMedium="#FF9A9A9A"
                                    BaseMediumHigh="#FFB4B4B4"
                                    BaseMediumLow="#FF676767"
                                    ChromeAltLow="#FFB4B4B4"
                                    ChromeBlackHigh="#FF000000"
                                    ChromeBlackLow="#FFB4B4B4"
                                    ChromeBlackMedium="#FF000000"
                                    ChromeBlackMediumLow="#FF000000"
                                    ChromeDisabledHigh="#FF333333"
                                    ChromeDisabledLow="#FF9A9A9A"
                                    ChromeGray="#FF808080"
                                    ChromeHigh="#FF808080"
                                    ChromeLow="#FF151515"
                                    ChromeMedium="#FF1D1D1D"
                                    ChromeMediumLow="#FF2C2C2C"
                                    ChromeWhite="#FFFFFFFF"
                                    ListLow="#FF1D1D1D"
                                    ListMedium="#FF333333" />
                                <ResourceDictionary>
                                    <BelowWindows10version1809:Color x:Key="SystemAccentColor">#FF0073CF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltHighColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltLowColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltMediumColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltMediumHighColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltMediumLowColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseHighColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseLowColor">#FF333333</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseMediumColor">#FF9A9A9A</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseMediumHighColor">#FFB4B4B4</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseMediumLowColor">#FF676767</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeAltLowColor">#FFB4B4B4</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackHighColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackLowColor">#FFB4B4B4</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackMediumColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackMediumLowColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeDisabledHighColor">#FF333333</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeDisabledLowColor">#FF9A9A9A</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeGrayColor">#FF808080</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeHighColor">#FF808080</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeLowColor">#FF151515</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeMediumColor">#FF1D1D1D</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeMediumLowColor">#FF2C2C2C</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeWhiteColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemListLowColor">#FF1D1D1D</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemListMediumColor">#FF333333</BelowWindows10version1809:Color>
                                    <Color x:Key="SystemChromeAltMediumHighColor">#CC000000</Color>
                                    <Color x:Key="SystemChromeAltHighColor">#FF333333</Color>
                                    <Color x:Key="SystemRevealListLowColor">#FF1D1D1D</Color>
                                    <Color x:Key="SystemRevealListMediumColor">#FF333333</Color>
                                    <!--  Override system shape defaults  -->
                                    <CornerRadius x:Key="ControlCornerRadius">2,2,2,2</CornerRadius>
                                    <CornerRadius x:Key="OverlayCornerRadius">4,4,4,4</CornerRadius>
                                    <!--  Override system borders  -->
                                    <Thickness x:Key="MenuBarItemBorderThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="GridViewItemMultiselectBorderThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="CheckBoxBorderThemeThickness">1</Thickness>
                                    <x:Double x:Key="GridViewItemSelectedBorderThemeThickness">1</x:Double>
                                    <x:Double x:Key="RadioButtonBorderThemeThickness">1</x:Double>
                                    <Thickness x:Key="ButtonBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="CalendarDatePickerBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="TimePickerBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="DatePickerBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ToggleSwitchOuterBorderStrokeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="RepeatButtonBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="SearchBoxBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ToggleButtonBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="TextControlBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="RepeatButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="AppBarEllipsisButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="AppBarButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="AppBarToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ListViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="GridViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ComboBoxItemRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <x:Double x:Key="PersonPictureEllipseBadgeStrokeThickness">1</x:Double>
                                    <!--  Override system generated accent colors  -->
                                    <Color x:Key="SystemAccentColorDark1">#FF1D85D7</Color>
                                    <Color x:Key="SystemAccentColorDark2">#FF3B97DF</Color>
                                    <Color x:Key="SystemAccentColorDark3">#FF58A8E8</Color>
                                    <Color x:Key="SystemAccentColorLight1">#FF0064BE</Color>
                                    <Color x:Key="SystemAccentColorLight2">#FF0055AD</Color>
                                    <Color x:Key="SystemAccentColorLight3">#FF00459D</Color>
                                    <Color x:Key="RegionColor">#FF000000</Color>
                                    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
                                </ResourceDictionary>
                            </ResourceDictionary.MergedDictionaries>
                        </ResourceDictionary>
                        <ResourceDictionary x:Key="Light">
                            <ResourceDictionary.MergedDictionaries>
                                <Windows10version1809:ColorPaletteResources
                                    Accent="#FF0073CF"
                                    AltHigh="#FFFFFFFF"
                                    AltLow="#FFFFFFFF"
                                    AltMedium="#FFFFFFFF"
                                    AltMediumHigh="#FFFFFFFF"
                                    AltMediumLow="#FFFFFFFF"
                                    BaseHigh="#FF000000"
                                    BaseLow="#FFCCCCCC"
                                    BaseMedium="#FF898989"
                                    BaseMediumHigh="#FF5D5D5D"
                                    BaseMediumLow="#FF737373"
                                    ChromeAltLow="#FF5D5D5D"
                                    ChromeBlackHigh="#FF000000"
                                    ChromeBlackLow="#FFCCCCCC"
                                    ChromeBlackMedium="#FF5D5D5D"
                                    ChromeBlackMediumLow="#FF898989"
                                    ChromeDisabledHigh="#FFCCCCCC"
                                    ChromeDisabledLow="#FF898989"
                                    ChromeGray="#FF737373"
                                    ChromeHigh="#FFCCCCCC"
                                    ChromeLow="#FFECECEC"
                                    ChromeMedium="#FFE6E6E6"
                                    ChromeMediumLow="#FFECECEC"
                                    ChromeWhite="#FFFFFFFF"
                                    ListLow="#FFE6E6E6"
                                    ListMedium="#FFCCCCCC" />
                                <ResourceDictionary>
                                    <BelowWindows10version1809:Color x:Key="SystemAccentColor">#FF0073CF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltHighColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltLowColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltMediumColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltMediumHighColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemAltMediumLowColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseHighColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseLowColor">#FFCCCCCC</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseMediumColor">#FF898989</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseMediumHighColor">#FF5D5D5D</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemBaseMediumLowColor">#FF737373</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeAltLowColor">#FF5D5D5D</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackHighColor">#FF000000</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackLowColor">#FFCCCCCC</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackMediumColor">#FF5D5D5D</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeBlackMediumLowColor">#FF898989</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeDisabledHighColor">#FFCCCCCC</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeDisabledLowColor">#FF898989</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeGrayColor">#FF737373</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeHighColor">#FFCCCCCC</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeLowColor">#FFECECEC</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeMediumColor">#FFE6E6E6</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeMediumLowColor">#FFECECEC</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemChromeWhiteColor">#FFFFFFFF</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemListLowColor">#FFE6E6E6</BelowWindows10version1809:Color>
                                    <BelowWindows10version1809:Color x:Key="SystemListMediumColor">#FFCCCCCC</BelowWindows10version1809:Color>
                                    <Color x:Key="SystemChromeAltMediumHighColor">#CCFFFFFF</Color>
                                    <Color x:Key="SystemChromeAltHighColor">#FFCCCCCC</Color>
                                    <Color x:Key="SystemRevealListLowColor">#FFE6E6E6</Color>
                                    <Color x:Key="SystemRevealListMediumColor">#FFCCCCCC</Color>
                                    <!--  Override system shape defaults  -->
                                    <CornerRadius x:Key="ControlCornerRadius">2,2,2,2</CornerRadius>
                                    <CornerRadius x:Key="OverlayCornerRadius">4,4,4,4</CornerRadius>
                                    <!--  Override system borders  -->
                                    <Thickness x:Key="MenuBarItemBorderThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="GridViewItemMultiselectBorderThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="CheckBoxBorderThemeThickness">1</Thickness>
                                    <x:Double x:Key="GridViewItemSelectedBorderThemeThickness">1</x:Double>
                                    <x:Double x:Key="RadioButtonBorderThemeThickness">1</x:Double>
                                    <Thickness x:Key="ButtonBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="CalendarDatePickerBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="TimePickerBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="DatePickerBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ToggleSwitchOuterBorderStrokeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="RepeatButtonBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="SearchBoxBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ToggleButtonBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="TextControlBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="RepeatButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="AppBarEllipsisButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="AppBarButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="AppBarToggleButtonRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ListViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="GridViewItemRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <Thickness x:Key="ComboBoxItemRevealBorderThemeThickness">1,1,1,1</Thickness>
                                    <x:Double x:Key="PersonPictureEllipseBadgeStrokeThickness">1</x:Double>
                                    <!--  Override system generated accent colors  -->
                                    <Color x:Key="SystemAccentColorLight1">#FF1D85D7</Color>
                                    <Color x:Key="SystemAccentColorLight2">#FF3B97DF</Color>
                                    <Color x:Key="SystemAccentColorLight3">#FF58A8E8</Color>
                                    <Color x:Key="SystemAccentColorDark1">#FF0064BE</Color>
                                    <Color x:Key="SystemAccentColorDark2">#FF0055AD</Color>
                                    <Color x:Key="SystemAccentColorDark3">#FF00459D</Color>
                                    <RevealBackgroundBrush
                                        x:Key="SystemControlHighlightListLowRevealBackgroundBrush"
                                        FallbackColor="{StaticResource SystemListMediumColor}"
                                        TargetTheme="Light"
                                        Color="{ThemeResource SystemRevealListMediumColor}" />
                                    <Color x:Key="RegionColor">#FFFFFFFF</Color>
                                    <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
                                </ResourceDictionary>
                            </ResourceDictionary.MergedDictionaries>
                        </ResourceDictionary>
                        <ResourceDictionary x:Key="HighContrast">
                            <StaticResource x:Key="RegionColor" ResourceKey="SystemColorWindowColor" />
                            <SolidColorBrush x:Key="RegionBrush" Color="{StaticResource RegionColor}" />
                        </ResourceDictionary>
                    </ResourceDictionary.ThemeDictionaries>
                </ResourceDictionary>

                <ResourceDictionary>
                    <Thickness x:Key="ComboBoxBorderThemeThickness">1</Thickness>

                    <!--  Default style for Windows.UI.Xaml.Controls.ComboBox  -->

                    <Style x:Key="HeaderedComboBoxStyle" TargetType="ComboBox">
                        <Setter Property="Padding" Value="12,5,0,7" />
                        <Setter Property="MinWidth" Value="{ThemeResource ComboBoxThemeMinWidth}" />
                        <Setter Property="Foreground" Value="{ThemeResource ComboBoxForeground}" />
                        <Setter Property="Background" Value="{ThemeResource ComboBoxBackground}" />
                        <Setter Property="BorderBrush" Value="{ThemeResource ComboBoxBorderBrush}" />
                        <Setter Property="BorderThickness" Value="{ThemeResource ComboBoxBorderThemeThickness}" />
                        <Setter Property="TabNavigation" Value="Once" />
                        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Disabled" />
                        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto" />
                        <Setter Property="ScrollViewer.HorizontalScrollMode" Value="Disabled" />
                        <Setter Property="ScrollViewer.VerticalScrollMode" Value="Auto" />
                        <Setter Property="ScrollViewer.IsVerticalRailEnabled" Value="True" />
                        <Setter Property="ScrollViewer.IsDeferredScrollingEnabled" Value="False" />
                        <Setter Property="ScrollViewer.BringIntoViewOnFocusChange" Value="True" />
                        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
                        <Setter Property="HorizontalAlignment" Value="Left" />
                        <Setter Property="VerticalAlignment" Value="Top" />
                        <Setter Property="FontFamily" Value="{ThemeResource ContentControlThemeFontFamily}" />
                        <Setter Property="FontSize" Value="{ThemeResource ControlContentThemeFontSize}" />
                        <Setter Property="UseSystemFocusVisuals" Value="{ThemeResource IsApplicationFocusVisualKindReveal}" />
                        <Setter Property="ItemsPanel">
                            <Setter.Value>
                                <ItemsPanelTemplate>
                                    <CarouselPanel />
                                </ItemsPanelTemplate>
                            </Setter.Value>
                        </Setter>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="ComboBox">
                                    <Grid x:Name="LayoutRoot">
                                        <Grid.Resources>
                                            <Storyboard x:Key="OverlayOpeningAnimation">
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="0.0" />
                                                    <SplineDoubleKeyFrame
                                                        KeySpline="0.1,0.9 0.2,1.0"
                                                        KeyTime="0:0:0.383"
                                                        Value="1.0" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                            <Storyboard x:Key="OverlayClosingAnimation">
                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity">
                                                    <DiscreteDoubleKeyFrame KeyTime="0:0:0" Value="1.0" />
                                                    <SplineDoubleKeyFrame
                                                        KeySpline="0.1,0.9 0.2,1.0"
                                                        KeyTime="0:0:0.216"
                                                        Value="0.0" />
                                                </DoubleAnimationUsingKeyFrames>
                                            </Storyboard>
                                        </Grid.Resources>
                                        <Grid.RowDefinitions>
                                            <RowDefinition Height="Auto" />
                                            <RowDefinition Height="*" />
                                        </Grid.RowDefinitions>

                                        <Grid.ColumnDefinitions>
                                            <ColumnDefinition Width="*" />
                                            <ColumnDefinition Width="32" />
                                        </Grid.ColumnDefinitions>
                                        <ContentPresenter
                                            x:Name="HeaderContentPresenter"
                                            Margin="{ThemeResource ComboBoxHeaderThemeMargin}"
                                            x:DeferLoadStrategy="Lazy"
                                            Content="{TemplateBinding Header}"
                                            ContentTemplate="{TemplateBinding HeaderTemplate}"
                                            FlowDirection="{TemplateBinding FlowDirection}"
                                            FontWeight="{ThemeResource ComboBoxHeaderThemeFontWeight}"
                                            Visibility="Collapsed" />
                                        <Border
                                            x:Name="Background"
                                            Grid.RowSpan="2"
                                            Grid.ColumnSpan="2"
                                            Background="{TemplateBinding Background}"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            Control.IsTemplateFocusTarget="True" />
                                        <Border
                                            x:Name="HighlightBackground"
                                            Grid.RowSpan="2"
                                            Grid.ColumnSpan="2"
                                            Background="{ThemeResource ComboBoxBackgroundUnfocused}"
                                            BorderBrush="{ThemeResource ComboBoxBackgroundBorderBrushUnfocused}"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            Opacity="0" />
                                        <ContentPresenter
                                            x:Name="ContentPresenter"
                                            Grid.Row="1"
                                            Margin="{TemplateBinding Padding}"
                                            HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                            VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                            <TextBlock
                                                x:Name="PlaceholderTextBlock"
                                                Foreground="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource ComboBoxPlaceHolderForeground}}"
                                                Text="{TemplateBinding PlaceholderText}" />
                                        </ContentPresenter>
                                        <FontIcon
                                            x:Name="DropDownGlyph"
                                            Grid.Row="1"
                                            Grid.Column="1"
                                            Margin="0,10,10,10"
                                            HorizontalAlignment="Right"
                                            VerticalAlignment="Center"
                                            AutomationProperties.AccessibilityView="Raw"
                                            FontFamily="{ThemeResource SymbolThemeFontFamily}"
                                            FontSize="12"
                                            Foreground="{ThemeResource ComboBoxDropDownGlyphForeground}"
                                            Glyph="&#xE0E5;"
                                            IsHitTestVisible="False" />
                                        <Popup x:Name="Popup">
                                            <Border
                                                x:Name="PopupBorder"
                                                Margin="0,-1,0,-1"
                                                HorizontalAlignment="Stretch"
                                                Background="{ThemeResource ComboBoxDropDownBackground}"
                                                BorderBrush="{ThemeResource ComboBoxDropDownBorderBrush}"
                                                BorderThickness="{ThemeResource ComboBoxDropdownBorderThickness}">
                                                <ScrollViewer
                                                    x:Name="ScrollViewer"
                                                    MinWidth="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownContentMinWidth}"
                                                    AutomationProperties.AccessibilityView="Raw"
                                                    BringIntoViewOnFocusChange="{TemplateBinding ScrollViewer.BringIntoViewOnFocusChange}"
                                                    Foreground="{ThemeResource ComboBoxDropDownForeground}"
                                                    HorizontalScrollBarVisibility="{TemplateBinding ScrollViewer.HorizontalScrollBarVisibility}"
                                                    HorizontalScrollMode="{TemplateBinding ScrollViewer.HorizontalScrollMode}"
                                                    IsDeferredScrollingEnabled="{TemplateBinding ScrollViewer.IsDeferredScrollingEnabled}"
                                                    IsHorizontalRailEnabled="{TemplateBinding ScrollViewer.IsHorizontalRailEnabled}"
                                                    IsVerticalRailEnabled="{TemplateBinding ScrollViewer.IsVerticalRailEnabled}"
                                                    VerticalScrollBarVisibility="{TemplateBinding ScrollViewer.VerticalScrollBarVisibility}"
                                                    VerticalScrollMode="{TemplateBinding ScrollViewer.VerticalScrollMode}"
                                                    VerticalSnapPointsAlignment="Near"
                                                    VerticalSnapPointsType="OptionalSingle"
                                                    ZoomMode="Disabled">
                                                    <ItemsPresenter Margin="{ThemeResource ComboBoxDropdownContentMargin}" />
                                                </ScrollViewer>
                                            </Border>
                                        </Popup>

                                        <VisualStateManager.VisualStateGroups>
                                            <VisualStateGroup x:Name="CommonStates">
                                                <VisualState x:Name="Normal" />

                                                <VisualState x:Name="PointerOver">

                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="BorderBrush">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBorderBrushPointerOver}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>

                                                <VisualState x:Name="Pressed">

                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="BorderBrush">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBorderBrushPressed}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>

                                                <VisualState x:Name="Disabled">

                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="Background">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundDisabled}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Background" Storyboard.TargetProperty="BorderBrush">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBorderBrushDisabled}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HeaderContentPresenter" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundDisabled}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundDisabled}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource ComboBoxForegroundDisabled}}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxDropDownGlyphForegroundDisabled}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="FocusStates">
                                                <VisualState x:Name="Focused">

                                                    <Storyboard>
                                                        <DoubleAnimation
                                                            Storyboard.TargetName="HighlightBackground"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To="1"
                                                            Duration="0" />
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="HighlightBackground" Storyboard.TargetProperty="BorderBrush">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxBackgroundBorderBrushFocused}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundFocused}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource ComboBoxForegroundFocused}}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxDropDownGlyphForegroundFocused}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="FocusedPressed">

                                                    <Storyboard>
                                                        <DoubleAnimation
                                                            Storyboard.TargetName="HighlightBackground"
                                                            Storyboard.TargetProperty="Opacity"
                                                            To="1"
                                                            Duration="0" />
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxForegroundFocusedPressed}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="PlaceholderTextBlock" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{Binding PlaceholderForeground, RelativeSource={RelativeSource TemplatedParent}, TargetNullValue={ThemeResource ComboBoxPlaceHolderForegroundFocusedPressed}}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="DropDownGlyph" Storyboard.TargetProperty="Foreground">
                                                            <DiscreteObjectKeyFrame KeyTime="0" Value="{ThemeResource ComboBoxDropDownGlyphForegroundFocusedPressed}" />
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Unfocused" />
                                                <VisualState x:Name="PointerFocused" />
                                                <VisualState x:Name="FocusedDropDown">

                                                    <Storyboard>
                                                        <ObjectAnimationUsingKeyFrames
                                                            Storyboard.TargetName="PopupBorder"
                                                            Storyboard.TargetProperty="Visibility"
                                                            Duration="0">
                                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                                <DiscreteObjectKeyFrame.Value>
                                                                    <Visibility>Visible</Visibility>
                                                                </DiscreteObjectKeyFrame.Value>
                                                            </DiscreteObjectKeyFrame>
                                                        </ObjectAnimationUsingKeyFrames>
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>
                                            <VisualStateGroup x:Name="DropDownStates">
                                                <VisualState x:Name="Opened">

                                                    <Storyboard>
                                                        <SplitOpenThemeAnimation
                                                            ClosedTargetName="ContentPresenter"
                                                            OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}"
                                                            OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"
                                                            OpenedTargetName="PopupBorder" />
                                                    </Storyboard>
                                                </VisualState>
                                                <VisualState x:Name="Closed">

                                                    <Storyboard>
                                                        <SplitCloseThemeAnimation
                                                            ClosedTargetName="ContentPresenter"
                                                            OffsetFromCenter="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOffset}"
                                                            OpenedLength="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TemplateSettings.DropDownOpenedHeight}"
                                                            OpenedTargetName="PopupBorder" />
                                                    </Storyboard>
                                                </VisualState>
                                            </VisualStateGroup>

                                        </VisualStateManager.VisualStateGroups>
                                    </Grid>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                    <Style BasedOn="{StaticResource HeaderedComboBoxStyle}" TargetType="ComboBox" />

                </ResourceDictionary>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Application.Resources>
@touseefbsb
Copy link
Author

on further investigation I found out that removing "AltMediumLow" from colorpelleteResources tag fixes the issue but that very odd because that shouldnt be removed as it is part of the default generated theme by fluent theme editor.

image

@kikisaints
Copy link
Contributor

The 'default' theme that the editor generates is a recreation of our default theme from generic.xaml. It looks like it's miss-generating some pieces. I'll look into it.

@kikisaints kikisaints self-assigned this Jun 4, 2020
@kikisaints kikisaints added the bug Something isn't working label Jun 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants