【问题标题】:Category of UserControl, CustomControl propertyUserControl、CustomControl 属性的类别
【发布时间】:2014-01-03 05:53:57
【问题描述】:

我正在开发我的新CustomControl,我知道当我将[Caterogy("MyCategeory")] 放在属性上时,它会在设计模式下在属性列表中创建一个新类别

例子:

[Category("Mask")]
public string Mask
{
    get
    {
        return _Mask;
    }
    set
    {
        this._Mask = value;
    }
}

这是什么名字?我如何搜索它?我想满足其他功能来自定义我的控件属性,但我不知道如何调用它,我不知道我还能做些什么来自定义我的属性

例如,我如何设置一个属性包含get,set,但在属性列表中没有显示?

【问题讨论】:

    标签: c# wpf properties controls


    【解决方案1】:

    类别Attribute的一个例子。

    谷歌“C# 属性”,您应该会找到大量参考资料来帮助您探索。

    【讨论】:

      猜你喜欢
      • 2011-05-29
      • 2013-02-24
      • 1970-01-01
      • 1970-01-01
      • 2016-08-29
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-20
      相关资源
      最近更新 更多