Overriding "Text" Property

Q

Qubeczek

Hello,
I have some control delivering form UserControl.

I'd like to hide oryginal property "Text". And I do it.

new public string Text
{
set
{
base.Text = value;
SetAutoSize(AutoSize);
}
get
{
return base.Text;
}
}

But the problem I have, is that this property is not shown in "Properties"
grid during designin form that using my control.
Under desktop .NET it works fine.

I have try attribute:
[System.ComponentModel.EditorBrowsable]
before the property definition, but it dosen't work.

I use the same project for run-time and design-time (couse I don't know, how
to build separate ones).

The question is: how to make may new "Text" property visible and editable in
designer property grid ?
Thanks for help
Qubeczek
 
P

Peter Morris [Droopy eyes software]

Isn't there a Changed or TextChanged event or something you could plug into
and trigger your code from there instead?
 
Q

Qubeczek

U¿ytkownik "Peter Morris [Droopy eyes software]"
Isn't there a Changed or TextChanged event or something you could plug
into and trigger your code from there instead?

Even if there is something like this,

but for my own proerties there is not any of those events.

There is the global question:
Under desktop .NET 2.0 there is a lot of attributes that allow to manage
user-control behavior in VS 2005 designer (eg. Browsable, Editable, REadOnly
and many others.

How to do the same under .NET CF user-controls ? There is not allowed to use
that atributes, becouse then the code dosen't compile.

But I found the article where there is description how to make design-time
apckage. But I can not reporduce those project.
Can anyone made their own user-control under .NET CF ? If yes - can I please
the sample solution ?

Best regards
Qubeczek
 
Q

Qubeczek

And,
there is mentioned article about design-time controls.

http://msdn2.microsoft.com/en-us/library/aa446505.aspx

But how to reproduce it ?

Best regards
Qubeczek

U¿ytkownik "Qubeczek said:
U¿ytkownik "Peter Morris [Droopy eyes software]"
Isn't there a Changed or TextChanged event or something you could plug
into and trigger your code from there instead?

Even if there is something like this,

but for my own proerties there is not any of those events.

There is the global question:
Under desktop .NET 2.0 there is a lot of attributes that allow to manage
user-control behavior in VS 2005 designer (eg. Browsable, Editable,
REadOnly and many others.

How to do the same under .NET CF user-controls ? There is not allowed to
use that atributes, becouse then the code dosen't compile.

But I found the article where there is description how to make design-time
apckage. But I can not reporduce those project.
Can anyone made their own user-control under .NET CF ? If yes - can I
please the sample solution ?

Best regards
Qubeczek
 
Q

Qubeczek

Hy,

I've found the example, but ...

all this theory is for Visual Studio 7 and .NET 1.1

Eeehhhh....

Have anyone another ideas ?

Thans
Qubeczek
 

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