Visual Studio:使用分层面板对齐线 [英] Visual Studio: Snap lines with layered panels

查看:108
本文介绍了Visual Studio:使用分层面板对齐线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在Visual Studio中使用具有分层面板的Windows窗体应用程序.这是一个拆分的面板视图,在左侧带有供用户选择的选项树,并根据他们的选择将适当的面板放到最前面. 右边.

I'm working in Visual Studio with a Windows Forms Application that has layered panels.  It's a split panel view, with a tree of options for the user to select on the left, and based on their selection, the appropriate panel if brought to the front on the right.

在Visual Studio中使用Designer设计面板时,我利用对齐线来对齐控件.在添加几层面板后,我注意到对齐线将考虑所有面板层,而不仅仅是我正在设计的面板 在顶部.这已经很烦人了,因为在面板上对齐控件变得越来越困难.

When designing panels with the Designer in Visual Studio, I take advantage of the snap lines for aligning controls.  I've noticed after adding several layers of panels, that the snap lines consider all the panel layers, not just the panel that I'm designing on the top.  This has become an annoyance, as it's becoming more and more difficult to align controls on the panel.

我是否错过了某个设置,因为它们使对齐线始终集中在我要布置的当前面板上,而忽略了埋在下面的其他面板?我不能成为第一个将面板层叠在一起的人...

Is there a settings somewhere that I've missed, for having the snap lines remain focused on the current panel in which I'm laying out, and to ignore the other panels buried underneath?  I can't be the first person to layer panels on top of each other...

谢谢!

推荐答案

嗨fonbr01,

Hi fonbr01,

根据您的描述,您的意思是当您在WinForm页面中添加几层面板时,捕捉线将考虑所有面板层,如屏幕截图所示,是吗?

According to your description, you mean when you add several layers of panels in your WinForm page, the snap lines will consider all the panel layers as below screenshot shows, is it right?

这是在WinForm Designer中在当前面板中绘制控件时的默认操作,因为它需要考虑它是否与其他控件整齐.但是,当您拖动此控件时,它将仅考虑您正在使用的当前面板.

This is the default action when you draw the controls in current panel in WinForm Designer, because it need to consider whether it is in neat with other controls. But when you drag this controls, it will only consider current panel that you are working on.

因此,我建议您首先绘制控件,然后根据对齐线通过拖动将其布置在当前面板上.

So I suggest you could draw the controls first and then through drag to layout it on current panel based on the snap lines.

如有误解,请提供一些屏幕截图以帮助您理解问题.谢谢.

If misunderstanding, please provide some screenshots to help understanding your problem. Thanks.

最好的问候,
Weiwei

Best Regards,
Weiwei


这篇关于Visual Studio:使用分层面板对齐线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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