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

MetroWindow not selecting correct icon size from *.ico file #1242

Closed
amkuchta opened this issue Mar 31, 2014 · 5 comments
Closed

MetroWindow not selecting correct icon size from *.ico file #1242

amkuchta opened this issue Mar 31, 2014 · 5 comments

Comments

@amkuchta
Copy link
Contributor

I created a custom *.ico file that has multiple images stored in it at various sizes (example: 16x16, 24x24, 32x32 are all one image at different sizes, while 40x40, 48x48, 64x64, 96x96, 128x128, 256x256, and 512x512 are another image at those sizes).

Typically, Windows utilizes certain sizes for certain items (16x16 for title bar, 40x40 for ALT+Tab). However, utilizing MA.M, my MetroWindow shows the 256x256 image in the title bar instead of the 16x16 like it is supposed to. Is there any way to specify which size in the *.ico file to use for my title bar icon?

@punker76 punker76 added this to the v0.14 milestone Apr 10, 2014
@punker76
Copy link
Member

@amkuchta can you provide the icon or some xaml? we use the normal Image control. i don't know how it selects the right size???

                <Setter Property="IconTemplate">
                    <Setter.Value>
                        <DataTemplate>
                            <Image Width="{TemplateBinding Width}"
                                   Height="{TemplateBinding Height}"
                                   Source="{TemplateBinding Content}"
                                   RenderOptions.EdgeMode="{Binding IconEdgeMode, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:MetroWindow}}}"
                                   RenderOptions.BitmapScalingMode="{Binding IconBitmapScalingMode, Mode=OneWay, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Controls:MetroWindow}}}" />
                        </DataTemplate>
                    </Setter.Value>
                </Setter>

@amkuchta
Copy link
Contributor Author

amkuchta commented Jun 9, 2014

@punker76 my XAML is simple, I merely declared the Icon in my window:

Icon="/Vulnerator;component/Resources/chart.ico"

I also found this; maybe it could be of some use?

@amkuchta
Copy link
Contributor Author

amkuchta commented Jun 9, 2014

Oh, and as far as the Icon *.ico file goes, how would you like me to get that to you?

@amkuchta
Copy link
Contributor Author

@punker76 can I get this re-opened, given the above information?

@amkuchta
Copy link
Contributor Author

@punker76 👉 poke

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

No branches or pull requests

3 participants