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

Changing Close button icon. #1972

Closed
thndrwrks opened this issue Jun 10, 2015 · 6 comments · Fixed by #2378
Closed

Changing Close button icon. #1972

thndrwrks opened this issue Jun 10, 2015 · 6 comments · Fixed by #2378
Assignees
Milestone

Comments

@thndrwrks
Copy link

How might I go about changing the icons of the close button? My app can only be closed from the system tray (think Spotify) so I would like to change the close icon to be more indicative of it's behavior.

@thoemmi
Copy link
Collaborator

thoemmi commented Jun 11, 2015

The icons of the window buttons are currently hard-coded paths in the style for WindowButtonCommands. You have to create your own style if you want to change the icons.

@punker76
Copy link
Member

@thndrwrks @thoemmi or you can set the WindowCloseButtonStyle property of the MetroWindow with your own style that sets the content

@punker76
Copy link
Member

@thndrwrks @thoemmi na, my fail, yet not possible to override the content

@punker76
Copy link
Member

@thndrwrks is it maybe enough for you to disable or hide the button? if so, you can set IsCloseButtonEnabled or ShowCloseButton

@thoemmi
Copy link
Collaborator

thoemmi commented Jun 11, 2015

I think you're right, @punker76 . By overriding WindowCloseButtonStyle you could change Button.Content to replace the Path with something else.

@punker76
Copy link
Member

@thoemmi no, it's not possible, cause the content is set explicit https://github.com/MahApps/MahApps.Metro/blob/master/MahApps.Metro/Themes/MetroWindow.xaml#L598-L600
don't really know if we should change this

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

Successfully merging a pull request may close this issue.

3 participants