在用户控件中定义诸如边距之类的属性 [英] Define property like margin in user control
本文介绍了在用户控件中定义诸如边距之类的属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在用户控件中定义一个类似于margin属性的属性,我该如何定义它?因此,在设计器中展开时,它将显示All,Left,top,right,bottom.
I want to define a property in user control which is similar margin property, how can i define it ? so that it will show All,Left,top,right,bottom when expanded in designer.
推荐答案
最简单的方法是使用Margin所做的相同类: 填充 [
The easiest way is to use the same class that Margin does: the Padding[^] struct - that will do all the work for you.
这篇关于在用户控件中定义诸如边距之类的属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文