调整内容大小以适合wpf中的不同屏幕分辨率 [英] Sizing the content to fit into different screen resolution in wpf

查看:528
本文介绍了调整内容大小以适合wpf中的不同屏幕分辨率的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用wpf Usercontrol开发客户端/服务器应用程序,其中当我以不同的屏幕分辨率运行客户端应用程序时,页面中添加的控件(即大小)将发生变化.所以我想使控件的大小不变.任何人都可以帮帮我.

Hello everyone,

I am developing an client/sever application using wpf Usercontrol, in which when i run the client application on different screen resolution, then the controls(i.e. the size) added in the page changes. So i want to make the size of controls unchangable.Can anyone help me out.

推荐答案

在您的xaml页面中输入以下代码行:
In your xaml page put this line of code:
ResizeMode="NoResize"



甚至您都可以使用DockPanel将所有控件调整为主窗口的大小.

希望对您有所帮助.



Even you can use a DockPanel to adjust all controls to the size of main window.

Hope it helps.


这篇关于调整内容大小以适合wpf中的不同屏幕分辨率的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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