I'm using compact framework 3.5 and pocket pc 2003 platform.
I'm writing a custom control for my application. Some properties I want to be exposed as design-time attributes.
The way it is described in MSDN (http://msdn.microsoft.com/en-us/library/tk67c2t8.aspx) is not actually working.
I get:
The type or namespace name 'CategoryAttribute' could not be found (are you missing a using directive or an assembly reference?
I've used Intellisense to see what attributes I can write. It lists some strange things like:
- EditorBrowsable
- DesignerCategory
- DefaultValue
- DesignTimeVisible
There is more. If I try to use those this way:
public partial class Counter : UserControl
{
[EditorBrowsable(EditorBrowsableState.Always)]
[DesignerCategory("Data")]
[DesignTimeVisible(true)]
[DefaultValue(0)]
public UInt64 theNumber;
..i get following errors:
Attribute 'DesignerCategory' is not valid on this declaration type. It is only valid on 'class' declarations.
Attribute 'DesignTimeVisible' is not valid on this declaration type. It is only valid on 'class, interface' declarations.
What is the correct way to use design time attributes?