Answer the question
In order to leave comments, you need to log in
How to minimize window within mvvm pattern using Microsoft.Xaml.Behaviors.Wpf?
Hello! I have the following code which I am trying to minimize the window
<Button Style="{StaticResource HideButtonStyle}"
HorizontalAlignment="Right" Margin="0 0 43 0">
<inter:Interaction.Triggers>
<inter:EventTrigger EventName="Click">
<inter:ChangePropertyAction PropertyName="WindowState"
TargetObject="{Binding RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}}"
Value="WindowState.Minimized"
/>
</inter:EventTrigger>
</inter:Interaction.Triggers>
</Button>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question