Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 UserControl,想在设计时隐藏调整大小的句柄,就像 TextBoxControl,它只有两个句柄(左右两个句柄)......文本框的高度是固定的,除非你说它是多行的. 在这种情况下,文本框会显示所有九个大小调整句柄。
您需要为您的控件实现自定义设计器 ( ControlDesigner ),然后覆盖该SelectionRules属性。
SelectionRules
有用的参考:
扩展设计时支持
我认为您需要绘制自己的控件并在类中定义大小。我相信如果您继承用户控件,您将始终可以选择调整大小。