In WPF, is there a way to check the window's "WindowState" property in a Trigger? I've tried using the value of "0", "Minimized" and "WindowState.Minimized."
EXAMPLE:
<Window.Triggers>
<Trigger Property="WindowState" Value="Minimized">
<Setter Property="ShowInTaskBar" Value="False" />
</Trigger>
</Window.Triggers>
Or if you want a control other than the window to respond to the WindowState property you can use a DataTrigger instead:
Example of how to increase border thickness when a window is maximised. Otherwise, due to oddities of WindowChrome, the border will disappear.
This example also strips out the standard window header, so you have to add your own minimize/maximize/close buttons.
Works like this:
Edit: You need to place your trigger in the
Window.Style
.