Custom Property Tag in C#


Author
Message
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Good deal Smile
Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
If I had a dollar for every namespace missed...

Thanks!  I got it, now!
Bill

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
I think that Greg nailed it.  One thing to keep in mind is that the namespaces and classes are the same whether you are using VB.NET or C#.  So usually this is the issue.  One thing that you can do also is to copy out the "using" statements from the top of the designer file of the BO and paste them in the BO.cs file.  This will ensure that you have all of the same imports.
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (4.8K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
Did you add using statements so the attributes can be seen?

using MicroFour.StrataFrame.UI.Windows.Forms;

using System.ComponentModel;


I think these are the two needed...check the help file for custom properties.





Second, just in case you aren't used to attributes with c#, they use square brackets, not angle brackets:

[Browsable(False),

BusinessFieldDisplayInEditor(),

Description("Full Name"),

DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]

Bill Cunnien
Bill Cunnien
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Forum Members
Posts: 785, Visits: 3.6K
I am trying to add some custom properties to my business objects and I ran across a couple of posts (e.g. http://forum.strataframe.net/Topic13021-10-1.aspx#bm13027) that show how to attach a tag so that the property will be reflected in the intellisense and elsewhere.  It is VB and looks like this: 

<Browsable(false),
BusinessFieldDisplayInEditor(),
Description(
"MyCustomProperty"),
DesignerSerializationVisibility(
DesignerSerializationVisibility.Hidden)>

Is there a different set of instructions in the C# environment?  I tried using some of the attribute options, but those are not acceptable to the compiler. 

Thanks!
Bill


GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search