This my component.
public class MeuClienteInfo : Component
{
string nome;
EnderecoInfo endereco; // Objeto Endereco
protected internal MeuClienteInfo()
{
InitializeComponent();
}
public MeuClienteInfo(IContainer container)
{
container.Add(this);
InitializeComponent();
}
public string Nome
{
get { return this.nome; }
set { this.nome = value; }
}
public EnderecoInfo Endereco
{
get { return this.endereco; }
set { this.endereco = value; }
}
}
public class EnderecoInfo
{
string rua;
int numero;
string bairro;
public string Rua
{
get { return this.rua; }
set { this.rua = value; }
}
public int Numero
{
get { return this.numero; }
set { this.numero = value ; }
}
public string Bairro
{
get { return this.bairro; }
set { this.bairro = value; }
}
}
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> escreveu
na mensagem news:ez**************@TK2MSFTNGP05.phx.gbl...
Claudio,
To the property, you want to add the following attribute:
[TypeConverter(typeof(ExpandableObjectConverter))]
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com
"Claudio" <cl*****@digi.com.br> wrote in message
news:e$**************@TK2MSFTNGP04.phx.gbl...I am developping a component that there are some properties and methods,
and one of these properties has its own properties (ex. A componen name
MYCustomers with the property ADDRESS that has NAME, NUMBER, CITY, ZIPCODE
as its own propertis) How do I create this component in a way that I can
change the ADDRESS properties values at desing time. Does any anyone can
give an example?