开发者

How to disable maximize button in a WPF appication page not in a window

开发者 https://www.devze.com 2022-12-24 11:19 出处:网络
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

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.........


A WPF Page object does not exist on its own. It must be contained.

If you have it contained in a Window or NavigationWindow, disable the maximize button in the parent container.

If you have it contained in a web browser, you will probably not find a way to disable the maximize button because the browser controls this.

0

精彩评论

暂无评论...
验证码 换一张
取 消