Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear all,

I need to disable and enable the Windows [X] close button using the Binding (Mvvm).

What I have tried:

How can I do ?

Best Regards
Posted
Updated 22-Feb-22 21:17pm
v2

I did a quick Google search for wpf window close button and found this accepted solution on StackOverflow: Disable Close Button In Title Bar of a WPF Window (C#)
 
Share this answer
 
This blog post explains this with example:
Using Behaviors to Allow the ViewModel to Manage View Lifetime in M-V-VM : Reed Copsey, Jr.[^]


Hope this helps!!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900