Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T13:02:02+00:00 2026-06-17T13:02:02+00:00

I am creating Windows Store App. I use callisto library for create flyout in

  • 0

I am creating Windows Store App. I use callisto library for create flyout in settings. I have problem with styling buttons. When I mouse over the background and font becomes white…

See the picture (mouse is over second button): Pomidoro settings

This is my XAML file:

<UserControl
x:Class="Pomidoro.PomidoroUserControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Pomidoro"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
d:DesignHeight="300"
d:DesignWidth="400">

<Grid>
    <StackPanel x:Name="FlyoutContent">
        <Button 
            Name="ChoosePomidoroButton" 
            Click="ChoosePomidoroButton_Click"
            Content="Choose pomidoro image..."    
            Background="LightGray"
            Foreground="Black"
            BorderBrush="Black"           
            />
        <Button 
            Name="DefaultPomidoroButton" 
            Click="DefaultPomidoroButton_Click"
            Content="Set default pomidoro image"  
            Background="LightGray"
            Foreground="Black"
            BorderBrush="Black"
            />
    </StackPanel>
</Grid>

And this is how I create flyout in App.xaml.cs:

            // Add an Pomidoro settings
        var pomidoro = new SettingsCommand("pomidoro", "Pomidoro image", (handler) =>
        {
            var settings = new SettingsFlyout();
            settings.Content = new PomidoroUserControl();
            settings.HeaderText = "Pomidoro";
            settings.IsOpen = true;
        });

        args.Request.ApplicationCommands.Add(pomidoro);

When I tried use default styles…

<Button 
            Name="DefaultPomidoroButton" 
            Click="DefaultPomidoroButton_Click"
            Content="Set default pomidoro image"
            />

…background, border and foreground was white…and user was unable to see anything.

What should I do to apply default style to have gray button (as it is in many apps in Store)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T13:02:04+00:00Added an answer on June 17, 2026 at 1:02 pm

    The problem is that the default button style uses a white foreground and border brush, and a transparent background brush when your application is using the dark theme. On a Page, the default button style looks just fine:

    screenshot of default button style on dark background

    On the content pane of the Callisto SettingsFlyout, however, the button is invisible, because the content pane’s Background is white. You must have noticed this since you’re setting the Foreground and Background properties of the button manually in your UserControl.

    A solution is to define a new style for buttons on the SettingsFlyout, working off of the default button template to do so. The default styles are located here on an 64-bit machine:

    C:\Program Files (x86)\Windows Kits\8.0\Include\WinRT\Xaml\Design
    

    I found the default style for the Button control in default.xaml in this folder.

    First, I copied over this default style into a new resource dictionary. I set up App.xaml to reference this new resource dictionary like this:

    <!-- Add this line to your MergedDictionaries in App.xaml -->
    <ResourceDictionary Source="FlyoutResources.xaml"/>
    

    With a bit of work, I tweaked the copied-over default button style and gave it an unique key. Here is the example:

    <!-- contents of FlyoutResources.xaml -->
    <ResourceDictionary
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="using:App1">
    
        <ResourceDictionary.ThemeDictionaries>
            <ResourceDictionary x:Key="Default">
                <SolidColorBrush x:Key="FlyoutButtonForeground">#FF000000</SolidColorBrush>
                <SolidColorBrush x:Key="FlyoutButtonBackground">#FFD3D3D3</SolidColorBrush>
                <SolidColorBrush x:Key="FlyoutButtonBorder">#FF000000</SolidColorBrush>
                <SolidColorBrush x:Key="FlyoutButtonPointerOverBackgroundThemeBrush" Color="#21D3D3D3" />
                <SolidColorBrush x:Key="FlyoutButtonPointerOverForegroundThemeBrush" Color="#FF000000" />
                <SolidColorBrush x:Key="FlyoutButtonPressedBackgroundThemeBrush" Color="#FFFFFFFF" />
                <SolidColorBrush x:Key="FlyoutButtonPressedForegroundThemeBrush" Color="#FF000000" />
                <SolidColorBrush x:Key="FlyoutButtonDisabledBackgroundThemeBrush" Color="#FFD3D3D3" />
                <SolidColorBrush x:Key="FlyoutButtonDisabledBorderThemeBrush" Color="#66000000" />
                <SolidColorBrush x:Key="FlyoutButtonDisabledForegroundThemeBrush" Color="#66000000" />
            </ResourceDictionary>
        </ResourceDictionary.ThemeDictionaries>
    
        <Style TargetType="Button" x:Key="flyoutButton">
            <Setter Property="Background" Value="{StaticResource FlyoutButtonBackground}" />
            <Setter Property="Foreground" Value="{StaticResource FlyoutButtonForeground}"/>
            <Setter Property="BorderBrush" Value="{StaticResource FlyoutButtonBorder}" />
            <Setter Property="BorderThickness" Value="{StaticResource ButtonBorderThemeThickness}" />
            <Setter Property="Padding" Value="12,4,12,4" />
            <Setter Property="HorizontalAlignment" Value="Left" />
            <Setter Property="VerticalAlignment" Value="Center" />
            <Setter Property="FontFamily" Value="{StaticResource ContentControlThemeFontFamily}" />
            <Setter Property="FontWeight" Value="SemiBold" />
            <Setter Property="FontSize" Value="{StaticResource ControlContentThemeFontSize}" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal" />
                                    <VisualState x:Name="PointerOver">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                           Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonPointerOverBackgroundThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
                                                                           Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonPointerOverForegroundThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                           Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonPressedBackgroundThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
                                                                           Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonPressedForegroundThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                           Storyboard.TargetProperty="Background">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonDisabledBackgroundThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="Border"
                                                                           Storyboard.TargetProperty="BorderBrush">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonDisabledBorderThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenter"
                                                                           Storyboard.TargetProperty="Foreground">
                                                <DiscreteObjectKeyFrame KeyTime="0" Value="{StaticResource FlyoutButtonDisabledForegroundThemeBrush}" />
                                            </ObjectAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused">
                                        <Storyboard>
                                            <DoubleAnimation Storyboard.TargetName="FocusVisualWhite"
                                                             Storyboard.TargetProperty="Opacity"
                                                             To="1"
                                                             Duration="0" />
                                            <DoubleAnimation Storyboard.TargetName="FocusVisualBlack"
                                                             Storyboard.TargetProperty="Opacity"
                                                             To="1"
                                                             Duration="0" />
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Unfocused" />
                                    <VisualState x:Name="PointerFocused" />
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Border x:Name="Border"
                                    Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Margin="3">
                                <ContentPresenter x:Name="ContentPresenter"
                                                  Content="{TemplateBinding Content}"
                                                  ContentTransitions="{TemplateBinding ContentTransitions}"
                                                  ContentTemplate="{TemplateBinding ContentTemplate}"
                                                  Margin="{TemplateBinding Padding}"
                                                  HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                  VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Border>
                            <Rectangle x:Name="FocusVisualWhite"
                                       IsHitTestVisible="False"
                                       Stroke="{StaticResource FocusVisualWhiteStrokeThemeBrush}"
                                       StrokeEndLineCap="Square"
                                       StrokeDashArray="1,1"
                                       Opacity="0"
                                       StrokeDashOffset="1.5" />
                            <Rectangle x:Name="FocusVisualBlack"
                                       IsHitTestVisible="False"
                                       Stroke="{StaticResource FocusVisualBlackStrokeThemeBrush}"
                                       StrokeEndLineCap="Square"
                                       StrokeDashArray="1,1"
                                       Opacity="0"
                                       StrokeDashOffset="0.5" />
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    
    </ResourceDictionary>
    

    The last step is to set that style on your XAML Button definitions:

    <Button 
        Name="ChoosePomidoroButton" 
        Content="Choose pomidoro image..."   
            Style="{StaticResource flyoutButton}"
        />
    
    <!-- etc. -->
    

    And here is how it looks (middle button is in the hover state):

    screenshot of button with custom style

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm creating a Windows Store app. I need to create a FileStream in order
I have a confusion regarding Windows Store/Windows 8 app development. When creating a Windows
I'm creating a windows app in c# 2008 that will have around 8-10 dialog
I have a great idea for a windows store app. I'd like to make
I am creating socket client (TCP) in Windows Store (8\Metro\RT) app and I am
I just understand for creating back button in Windows Store App in visual studio
I'm creating a Windows 8 app for the app store using VS Express 2012
BitmapSource does not have the Create method in the .NET API for Windows Store
I'm creating a cloud app that i have to store Texts and Pictures to
I am creating a windows phone application, which need to store some data in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.