简体   繁体   中英

How to remove the Window Commands From MahApps.Metro Template?

Metro template for WPF app. I want a Window which dont have any Window Command like minimize maximize and close. In normal WPf it can be done by WindowsStyle but how i can remove them in this template. And i also want to make the Window to be TopMost="True" and WindowState="Maximized". So all this settings are possible in this template ? Please advice ?

No need to thange templates, just set some properties.

MetroWindow has properties:

<controls:MetroWindow ...

    Topmost="True" 
    WindowState="Maximized"

    ShowTitleBar="False" // Hide colored tile bar, title header and icon

    ShowCloseButton="False" 
    ShowMaxRestoreButton="False" 
    ShowMinButton="False"

    ShowWindowCommandsOnTop="False" // No window commands on top of flyouts

which will remove title bar (icon+color), and you can remove buttons too.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM