How to remove window commands from MahApps.Metro template?

Metro template for a WPF application. I want a window that does not have any window command, how to minimize maximization and closure. In regular WPf, this can be done using WindowsStyle, but how can I remove them in this template. And I also want Window to be TopMost = "True" and WindowState = "Maximized." So, are all these settings possible in this template? Please advice?

+4
source share
1 answer

No need to change 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 the title bar (icon + color) and you can also remove the buttons.

+10

Source: https://habr.com/ru/post/1523795/


All Articles