Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 436
Antisan Avatar asked Dec 19 '22 18:12

Antisan


1 Answers

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.

like image 89
Aleksandar Toplek Avatar answered Mar 08 '23 02:03

Aleksandar Toplek