What happened to the Browsable Attribute???

O

Ole

It seems that the Browsable attribute is no longer supported in CF2.0 - is
that true or am I doing something wrong? It works perfectly well in the Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
 
O

Ole

Thanks Rick, before signing in and watching the 65 min. video I would like
to know if it applies to Compact Framework?

What I actually need is the possibility to set e.g. the text property in my
usercontrol during design time - therefore I need the Browsable attribute -
works well if the target is the normal framework, but not for the Compact
framework, even though it is only during design time on the PC ??

Thanks
Ole

dbgrick said:
This attribute is a design time attribute. Here is a great webcast that
explains how to use such attributes in your custom control library:

http://msevents.microsoft.com/cui/W...lture=en-US&EventID=1032277944&CountryCode=US

I hope this helps.
Regards,
Rick D.
Contractor

Ole said:
It seems that the Browsable attribute is no longer supported in CF2.0 -
is
that true or am I doing something wrong? It works perfectly well in the
Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
 
O

Ole

Found a solution:
http://blogs.msdn.com/bluecollar/ar...me-attributes-or-more-fun-with-textboxes.aspx

Thanks
Ole


Ole said:
Thanks Rick, before signing in and watching the 65 min. video I would like
to know if it applies to Compact Framework?

What I actually need is the possibility to set e.g. the text property in
my usercontrol during design time - therefore I need the Browsable
attribute - works well if the target is the normal framework, but not for
the Compact framework, even though it is only during design time on the PC
??

Thanks
Ole

dbgrick said:
This attribute is a design time attribute. Here is a great webcast that
explains how to use such attributes in your custom control library:

http://msevents.microsoft.com/cui/W...lture=en-US&EventID=1032277944&CountryCode=US

I hope this helps.
Regards,
Rick D.
Contractor

Ole said:
It seems that the Browsable attribute is no longer supported in CF2.0 -
is
that true or am I doing something wrong? It works perfectly well in the
Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
 
O

Ole

And then again I didn't :-(

The property shows correctly up in the Properties list during designtime and
I can enter a string in the "Text" property field - but Visual Studio
doesn't generate the line in "form.designer.cs" that holds the usercontrol:
this.myControl1.Text = "Entered text";
As the article desriped it would? - what could be wrong?

Thanks
Ole

Ole said:
Found a solution:
http://blogs.msdn.com/bluecollar/ar...me-attributes-or-more-fun-with-textboxes.aspx

Thanks
Ole


Ole said:
Thanks Rick, before signing in and watching the 65 min. video I would
like to know if it applies to Compact Framework?

What I actually need is the possibility to set e.g. the text property in
my usercontrol during design time - therefore I need the Browsable
attribute - works well if the target is the normal framework, but not for
the Compact framework, even though it is only during design time on the
PC ??

Thanks
Ole

dbgrick said:
This attribute is a design time attribute. Here is a great webcast that
explains how to use such attributes in your custom control library:

http://msevents.microsoft.com/cui/W...lture=en-US&EventID=1032277944&CountryCode=US

I hope this helps.
Regards,
Rick D.
Contractor

:

It seems that the Browsable attribute is no longer supported in CF2.0 -
is
that true or am I doing something wrong? It works perfectly well in the
Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
 
G

Guest

Please attach your property definition including the attributes. This might
provide a little more insight into the issue.

Regards,
Rick D.
Contractor

Ole said:
And then again I didn't :-(

The property shows correctly up in the Properties list during designtime and
I can enter a string in the "Text" property field - but Visual Studio
doesn't generate the line in "form.designer.cs" that holds the usercontrol:
this.myControl1.Text = "Entered text";
As the article desriped it would? - what could be wrong?

Thanks
Ole

Ole said:
Found a solution:
http://blogs.msdn.com/bluecollar/ar...me-attributes-or-more-fun-with-textboxes.aspx

Thanks
Ole


Ole said:
Thanks Rick, before signing in and watching the 65 min. video I would
like to know if it applies to Compact Framework?

What I actually need is the possibility to set e.g. the text property in
my usercontrol during design time - therefore I need the Browsable
attribute - works well if the target is the normal framework, but not for
the Compact framework, even though it is only during design time on the
PC ??

Thanks
Ole

This attribute is a design time attribute. Here is a great webcast that
explains how to use such attributes in your custom control library:

http://msevents.microsoft.com/cui/W...lture=en-US&EventID=1032277944&CountryCode=US

I hope this helps.
Regards,
Rick D.
Contractor

:

It seems that the Browsable attribute is no longer supported in CF2.0 -
is
that true or am I doing something wrong? It works perfectly well in the
Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
 
O

Ole

I have located the problem to a common problem for which I can't Google any
solutions. The problem is that my control is based / inherits the
UserControl that again is based on "Control". Control has a property for
"Text" but that is hidden to my control. Therefore it doesn't show up in my
projects Property list. In full framework it is possible to use an attribute
to unhide or make the Text property visible - Don't remember what - but the
Compact framework doesn't support that (strange since it all happens during
designe time).

Any clue om how do make a workaround?

Thanks,
Ole


dbgrick said:
Please attach your property definition including the attributes. This
might
provide a little more insight into the issue.

Regards,
Rick D.
Contractor

Ole said:
And then again I didn't :-(

The property shows correctly up in the Properties list during designtime
and
I can enter a string in the "Text" property field - but Visual Studio
doesn't generate the line in "form.designer.cs" that holds the
usercontrol:
this.myControl1.Text = "Entered text";
As the article desriped it would? - what could be wrong?

Thanks
Ole

Ole said:
Found a solution:
http://blogs.msdn.com/bluecollar/ar...me-attributes-or-more-fun-with-textboxes.aspx

Thanks
Ole


Thanks Rick, before signing in and watching the 65 min. video I would
like to know if it applies to Compact Framework?

What I actually need is the possibility to set e.g. the text property
in
my usercontrol during design time - therefore I need the Browsable
attribute - works well if the target is the normal framework, but not
for
the Compact framework, even though it is only during design time on
the
PC ??

Thanks
Ole

This attribute is a design time attribute. Here is a great webcast
that
explains how to use such attributes in your custom control library:

http://msevents.microsoft.com/cui/W...lture=en-US&EventID=1032277944&CountryCode=US

I hope this helps.
Regards,
Rick D.
Contractor

:

It seems that the Browsable attribute is no longer supported in
CF2.0 -
is
that true or am I doing something wrong? It works perfectly well in
the
Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
 
E

Emp Zoooli

I have encountered this problem recently, and found a very simple way to solve it.

In Visual Studio select your class (in class view) or source code (in solution explorer), and in the right click context menu select "view class diagram". A nice class diagram will be generated for you. In this diagram select the class containing the property to be annotated with an attribute. Now, in the "class details" window the properties of this class will be listed. In the list, select the property you want to annotate. Now, in the commonly used "Properties" window (yes, you are editing the properties of a property) find the "Custom Attributes" property, this is what you need. You can use the ... button to edit or add attributes. These attributes will be saved in an XML file, but this is completely handled by VS, you can close that XML file (or edit manually). You have to recompile your project to make these changes any effect.

Step-by-step description can be found here:
http://msdn.microsoft.com/en-us/library/ms180789(VS.90).aspx

peace,
EmpZ
It seems that the Browsable attribute is no longer supported in CF2.0 - is
that true or am I doing something wrong? It works perfectly well in the Full
framework version.

[System.Componentmodel.Browsable(true)]

Thanks,
Ole
On Wednesday, October 24, 2007 11:11 AM dbgric wrote:
This attribute is a design time attribute. Here is a great webcast that
explains how to use such attributes in your custom control library:

http://msevents.microsoft.com/cui/W...lture=en-US&EventID=1032277944&CountryCode=US

I hope this helps.
Regards,
Rick D.
Contractor

"Ole" wrote:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top