有没有一种简单的方法可以在运行时重新创建 WinForms 布局体验以供用户定位控件
在 Visual Studio 中布局 WinForm 时,您可以使用拖动手柄和边框对齐提示轻松调整控件的大小和对齐控件。
我想对运行时控件执行相同的操作,以使用户能够在页面上放置图像。
例如,如果用户有一张照片,并且他们希望将其作为桌面上的背景,我希望控件能够帮助他们在迷你桌面视觉效果中移动照片缩略图并调整其大小。
我可以做到所有这些,但我真正的问题是,有谁知道一种从标准 WinForms 布局编辑器继承的方法,以便我可以选择使用漂亮的停靠、对齐提示和控件调整大小,而无需再次编码?
预先感谢
瑞安
When laying out a WinForm in Visual Studio you get the ability to resize and align your controls very easily with drag handles and border alignment hints.
I'd like to do the same with a runtime control to enable the user to position an image on a page.
For example, if the user has a photo and they want to place it as a background on the desktop I'd like the control to help them move and size the photo thumbnail in a mini desktop visual.
I can do all of this, but my real question is, does anyone know of a way to inherit from the standard WinForms layout editor so that I can choose to use the nice docking, alignment hints and control resizing without coding it all again?
Thanks in advance
Ryan
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不知道简单,但您可以在自己的应用程序中托管实际的 winforms 设计器,而不会出现太多问题。请参阅 此处。
I don't know about easy, but you can host the actual winforms designer in your own applications without too many problems.. See here.