User Control won't appear in toolbox or properties (vs 2005 beta2)

  • Thread starter Thread starter billy
  • Start date Start date
B

billy

So let's say I start out with a new project (C++, CLR, Windows Form
App). Then go right to Add Class | User Control and name it Foo. Then I
add this code:

public:
int _propertyTest;

[Description(L"Test Property Visibility")]
[Category(L"Testing")]
[DefaultValue(true)]
[Browsable(true)]
[EditorBrowsable(EditorBrowsableState::Always)]
[Bindable(true)]

property int PropertyTest
{
int get()
{
return (_propertyTest);
}

void set(int inVal)
{
_propertyTest = inVal;
}
}

Shouldn't I see PropertyTest in the properties window? I must be doing
something wrong, but I can't see what. I've also tried to declare
PropertyTest as virtual.

Also, I want this to show up in the toolbox window as well but it
doesn't. I'm using the July distribution of VS.NET 2005 beta by-the-way.
Thanks,

~billy
 
So let's say I start out with a new project (C++, CLR, Windows Form App).
Then go right to Add Class | User Control and name it Foo. Then I add this
code:

public: int _propertyTest;

[Description(L"Test Property Visibility")]
[Category(L"Testing")]
[DefaultValue(true)]
[Browsable(true)]
[EditorBrowsable(EditorBrowsableState::Always)]
[Bindable(true)]

property int PropertyTest
{
int get()
{
return (_propertyTest);
}

void set(int inVal)
{
_propertyTest = inVal;
}
}

Shouldn't I see PropertyTest in the properties window? I must be doing
something wrong, but I can't see what. I've also tried to declare
PropertyTest as virtual.

Also, I want this to show up in the toolbox window as well but it doesn't.
I'm using the July distribution of VS.NET 2005 beta by-the-way.
Thanks,

I've followed your instructions and have built user control. Then when I've
added new form and put this control on the form the PropertyTest has
appeared in properties window when I've selected this control.
 
I was afraid of that. Ok well I guess there's something wrong with this
installation of vs.net - it didn't go so smoothly so I guess it doesn't
suprise me. By-the-way, which version of vs.net did you use? Thanks a lot,

~billy


Vladimir said:
So let's say I start out with a new project (C++, CLR, Windows Form App).
Then go right to Add Class | User Control and name it Foo. Then I add this
code:

public: int _propertyTest;

[Description(L"Test Property Visibility")]
[Category(L"Testing")]
[DefaultValue(true)]
[Browsable(true)]
[EditorBrowsable(EditorBrowsableState::Always)]
[Bindable(true)]

property int PropertyTest
{
int get()
{
return (_propertyTest);
}

void set(int inVal)
{
_propertyTest = inVal;
}
}

Shouldn't I see PropertyTest in the properties window? I must be doing
something wrong, but I can't see what. I've also tried to declare
PropertyTest as virtual.

Also, I want this to show up in the toolbox window as well but it doesn't.
I'm using the July distribution of VS.NET 2005 beta by-the-way.
Thanks,


I've followed your instructions and have built user control. Then when I've
added new form and put this control on the form the PropertyTest has
appeared in properties window when I've selected this control.
 
I was afraid of that. Ok well I guess there's something wrong with this
installation of vs.net - it didn't go so smoothly so I guess it doesn't
suprise me. By-the-way, which version of vs.net did you use? Thanks a lot,

It's:
Microsoft Visual Studio 2005
Version 8.0.50712.6 (lab23df.050712-0600)
Microsoft .NET Framework
Version 2.0.50712
 
You're running the one after the one I have installed. I suppose I
should update this system but it's been so painful each time. Ok well,
thanks a lot,

~billy
 
Back
Top