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

Icon color not changing on theme change #1029

Closed
Tide opened this issue Feb 14, 2014 · 3 comments
Closed

Icon color not changing on theme change #1029

Tide opened this issue Feb 14, 2014 · 3 comments

Comments

@Tide
Copy link
Contributor

Tide commented Feb 14, 2014

I am using a circle button like so:

                    <Button 
                            Width="50"
                            Height="50"
                            Margin="0"
                            Style="{DynamicResource MetroCircleButtonStyle}">
                        <Rectangle Width="20" Height="20">
                            <Rectangle.Fill>
                                <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_arrow_right}" />
                            </Rectangle.Fill>
                        </Rectangle>
                    </Button>

When I change the theme everything is updating but the arrow icon. If I start with the dark theme the arrow will stay white then switching to the light theme and vice versa.

@topvis
Copy link

topvis commented Feb 14, 2014

What if you put icon resource in your Windows.xmal?

@Tide
Copy link
Contributor Author

Tide commented Feb 14, 2014

That fixed it. Thanks for the help! Still seems odd I had to move it from App.xaml but whatever works. I am just glad to have it working.

@Tide Tide closed this as completed Feb 14, 2014
@gigios
Copy link

gigios commented Sep 4, 2015

I'm trying to use some icons in my application.
For the normal usage all works fine but if I try to change the theme the icons does not changes the color.
I have tried also to move the icon resource in the windows but without success. Only if I put the icon resource directly in my usercontrol the icon change the color when the user change the theme.
Seems that the only way to apply the new colors is to recreate the control (I have seen the same effect in the MetroDemo, if the Icon window is shown, if I change the theme the colors does not changes, if I close and reopen the window the icons use the correct colors).

There is a way to fix this behavior without close/reopen the page?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants