如何在WPF页面中禁用最大化按钮 [英] How to disable maximize button in WPF page

查看:91
本文介绍了如何在WPF页面中禁用最大化按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法在WPF页面中禁用最大化按钮或使用XAML或C禁用页面的resize属性#





当我在谷歌搜索时,我必须在WPF窗口中禁用它



如何在WPF页面中使用它。



请给我一个示例代码片段。

Is there any way to disable the maximize button in WPF page or to disable the resize property of page using XAML or C#


When I searched in Google , I got to disable it in WPF window

How can it possible in WPF page.

Pls suggest me the sample code snippet.

推荐答案

在你的MainWindow中只设置ResizeMode =NoResize
In your MainWindow just set ResizeMode="NoResize"


在MainWindow.xaml页面的第一个(Window)标签中添加
In first (Window) tag on MainWindow.xaml page add
ResizeMode="CanMinimize"


这与winforms不同,请参阅此处的讨论:



http://social.msdn.microsoft.com/论坛/ zh-CN / wpf / thread / d74820db-a002-4d4e-b96e-02d29dc4a119 [ ^ ]
This isn't like winforms, see the discussion here:

http://social.msdn.microsoft.com/Forums/en-US/wpf/thread/d74820db-a002-4d4e-b96e-02d29dc4a119[^]


这篇关于如何在WPF页面中禁用最大化按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆