C#Winform - UserControl [英] C# Winform - UserControl

查看:148
本文介绍了C#Winform - UserControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用Winform开发一个小软件,我有一堆用户控件。

I am working on a small software using Winform and I have a bunch of user controls.

Inside我的主机(主应用程序)我有一个用户控件,我使用"metroUserControl1.Controls.Add(World_01_Leaderboards.Instance);"

Inside my Mainframe(The main app) I have a user control and I add another user control using "metroUserControl1.Controls.Add(World_01_Leaderboards.Instance);"

添加另一个用户控件但是当我调整大小时形成我添加的用户控件没有调整大小。

But when i resize the form the the usercontrol I added does not resize.

有没有办法让它调整大小?

Is there a way to have it resize?

大型机内部的用户控件不是填充,而是使用整个表单调整大小。

The User Control that is inside the mainframe is not a fill but resizes with the whole form.

下面您可以看到我想用用户控件填写的蓝色区域和没有调整大小的灰色区域。

Below you can see the blue zone in which I want to fill in with the User Control and the grey zone that is not resizing.

推荐答案

您是否尝试过将Dock属性设置为DockStyle.Fill? 
Have you tried setting Dock property to DockStyle.Fill ? 


这篇关于C#Winform - UserControl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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