I am trying to delete "X"/ Close button on the right side of the WPF window. I tried researching a lot about it on internet and came across 2 methods of doing it.
- Completely removing the title bar by using GetWindowLong and SetWindowLong using solution posted in this post. How to hide close button in WPF window? Problem - this method removes the complete System menu(buttons of right side + Icon on left side) and I don't want ICON to disappear.
- Used GetSystemMenu,RemoveMenu Problem - this method only disables/grays out the X button although it keeps the ICON but doesn't remove the X button.
Can someone please help me with this issue?