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

After upgrade to 0.11, title bar icon have silver background instead of blue. #922

Closed
crjdriver opened this issue Jan 10, 2014 · 11 comments
Closed

Comments

@crjdriver
Copy link

Hello.

I upgraded our project to 0.11 and after that published out the build. It appears that on the dev machines, the title bar icons are correct, but the end users are missing the background coloration on the title bar buttons. I was thinking we're missing an assembly in the publish, but I'm not sure. Any ideas would be welcome. Any idea if the any of the MahApps dll's are put in the GAC upon install of the NuGet package for VS that wouldn't be in the user's GAC?

Here's our WindowCommand code and screenshots.

End user:
user_header

Dev machine:
dev_header

        <Controls:WindowCommands>
            <StackPanel Orientation="Horizontal">
                <Button ToolTip="Settings" Name="btnSettings" Click="btnSettings_Click">
                    <Rectangle Width="20" Height="20" Name="iconSettings">
                        <Rectangle.Resources>
                            <SolidColorBrush x:Key="BlackBrush" Color="White" />
                        </Rectangle.Resources>
                        <Rectangle.Fill>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_settings}" />
                        </Rectangle.Fill>
                    </Rectangle>
                </Button>
                <Button ToolTip="View Logs" Name="btnLogs" Click="btnLogs_Click">
                    <Rectangle Width="20" Height="20">
                        <Rectangle.Resources>
                            <SolidColorBrush x:Key="BlackBrush" Color="White" />
                        </Rectangle.Resources>
                        <Rectangle.Fill>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_book_open_hardcover}" />
                        </Rectangle.Fill>
                    </Rectangle>
                </Button>
                <Button ToolTip="Go to Admin Site" Name="btnWebsite" Click="btnWebsite_Click">
                    <Rectangle Width="20" Height="20">
                        <Rectangle.Resources>
                            <SolidColorBrush x:Key="BlackBrush" Color="White" />
                        </Rectangle.Resources>
                        <Rectangle.Fill>
                            <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_browser}" />
                        </Rectangle.Fill>
                    </Rectangle>
                </Button>
            </StackPanel>
        </Controls:WindowCommands>
    </Controls:MetroWindow.WindowCommands>
@AzureKitsune
Copy link
Member

On the end user's picture, what is that "plug" icon? Is that gray bar apart of it?

@crjdriver
Copy link
Author

No that's just a floating icon from the user's computer who took the screen shot. He had another program that places that icon on his desktop on top of everything, but this happens on all user's machines, even those who don't have that utility.

@AzureKitsune
Copy link
Member

@crjdriver Ok, we'll look into this for our v0.13 stable release (#925). Thank you for the bug report.

@AzureKitsune
Copy link
Member

Also, do you think you could provide us with more XAML (with any of your secret stuff stripped out)?

@AzureKitsune AzureKitsune mentioned this issue Jan 13, 2014
@flagbug
Copy link
Member

flagbug commented Jan 13, 2014

Just a random shot:

Could this be because of the StackPanel surrounding the buttons? Normally you don't need that

@flagbug
Copy link
Member

flagbug commented Jan 13, 2014

Oh, and do you know the operating system version of the user by any chance?

@crjdriver
Copy link
Author

I'll get you the rest of the XAML this afternoon. I'll also check the stackpanel and see if that's the issue.

All user's are on WIN7 x64.

@crjdriver
Copy link
Author

Hey there. Removed the stack panel and no joy. Tried to paste the XAML in here but the formatting is borked. I'll add a zip file of it.

@punker76
Copy link
Member

@crjdriver how looks your App.xaml? where do you put your resources from MahApps?

@crjdriver
Copy link
Author

Still can't format this here, so here's the pastebin link: http://pastebin.com/fJ2z4rLk

This is the main form of the app and has the MahApps resources there as well.

@zeluisping
Copy link
Contributor

I'm not sure if this can fix it, but it's worth a try:

    <Controls:MetroWindow.WindowCommands>
        <Controls:WindowCommands>
            <Button ToolTip="Settings" Name="btnSettings">
                <Rectangle Name="iconSettings" Fill="White" Width="20" Height="20">
                    <Rectangle.OpacityMask>
                        <VisualBrush Stretch="Fill" Visual="{StaticResource appbar_settings}" />
                    </Rectangle.OpacityMask>
                </Rectangle>
            </Button>
            <Button Name="btnRefresh" ToolTip="Refresh">
                <Rectangle Fill="White" Width="20" Height="20">
                    <Rectangle.OpacityMask>
                        <VisualBrush Stretch="Uniform" Visual="{StaticResource appbar_refresh}" />
                    </Rectangle.OpacityMask>
                </Rectangle>
            </Button>
        </Controls:WindowCommands>
    </Controls:MetroWindow.WindowCommands>

If you changed BlackBrush in iconSettings from code behind, you'd now change iconSettings.Fill.

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

No branches or pull requests

5 participants