我正在创建一个特殊的搜索文本框。除其他外,它有以下两个事件:
[Category("Behavior")]
public event EventHandler<GenericEventArgs<string>> Search;
[Category("Property Changed")]
public event EventHandler<EventArgs> ActiveColorChanged;
[Category("Property Changed")]
public event EventHandler<EventArgs> InactiveColorChanged;
事情是只有底部的两个显示在设计视图属性事件浏览器中(不管它的名字是什么......)。我想知道为什么。是因为我没有使用标准EventArgs
吗?但这不应该是这种情况,因为我的意思是,还有其他事件没有使用它......比如按键相关事件等......
该类GenericEventArgs<T>
如下所示:
public class GenericEventArgs<T> : EventArgs
{
public T Value { get; private set; }
public GenericEventArgs() : this(default(T)) { }
public GenericEventArgs(T value) { Value = value; }
}
我在这里做错了什么?