[TemplatePartAttribute(Name = "PART_GlowRect", Type = typeof(FrameworkElement))]
[TemplatePartAttribute(Name = "PART_Track", Type = typeof(FrameworkElement))][TemplatePartAttribute(Name = "PART_Indicator", Type = typeof(FrameworkElement))]
]public class ProgressBar : RangeBase
比如这种在方括号里写的是什么?还有Nunit也会用到方括号,还有声明API也要用到方括号,这样写是什么意思啊?这个在C#里叫什么?
[TemplatePartAttribute(Name = "PART_Track", Type = typeof(FrameworkElement))][TemplatePartAttribute(Name = "PART_Indicator", Type = typeof(FrameworkElement))]
]public class ProgressBar : RangeBase
比如这种在方括号里写的是什么?还有Nunit也会用到方括号,还有声明API也要用到方括号,这样写是什么意思啊?这个在C#里叫什么?
定义如下:
[TemplatePartAttribute(Name = "PART_Track", Type = typeof(FrameworkElement))]
[TemplatePartAttribute(Name = "PART_Indicator", Type = typeof(FrameworkElement))]
public class ProgressBar : RangeBase
得到附加属性列表的类
Type type = typeof(FrameworkElement);
http://msdn.microsoft.com/zh-cn/library/system.windows.frameworkelement.aspx
http://www.cnblogs.com/tuyile006/archive/2008/10/05/1304041.html