Last active
September 27, 2023 13:46
-
-
Save dkalamari/5712953 to your computer and use it in GitHub Desktop.
WPF Binding form close event to viewmodel command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Window x:Class="App.WPF.Windows.DocumentDetailsWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" WindowStartupLocation="CenterScreen" | |
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity" | |
Title="Document Details" Height="700" Width="700"> | |
<i:Interaction.Triggers> | |
<i:EventTrigger EventName="Closing"> | |
<i:InvokeCommandAction Command="{Binding CloseCommand}" /> | |
</i:EventTrigger> | |
</i:Interaction.Triggers> | |
</Window> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment