How to disable maximize button in a WPF appication page not in a window
- by Lukman
I want to disable the maximize button in WPF application page, not in a WPF application window
When I searched in Google, it is available methods for disabling the maximize button in WPF window
The code snippet is as follows
Window.WindowStyle= WindowStyle.None
But is not working in WPF page
It is showing errors.
In WPF page there is WindowStyleProperty instead of WindowStyle
and it is showing errors as
Error 1:A static readonly field cannot be assigned to (except in a static constructor or a variable initializer)
Error 2: Cannot implicitly convert type 'System.Windows.WindowStyle' to 'System.Windows.DependencyProperty'
So how can I disable the maximize button in WPF page
Then how can I implement it
Suggest me any sample code snippet....
Advance thanks.........