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]" <(E-Mail Removed)> escreveu
na mensagem news:(E-Mail Removed)...
> Claudio,
>
> To the property, you want to add the following attribute:
>
> [TypeConverter(typeof(ExpandableObjectConverter))]
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - (E-Mail Removed)
>
> "Claudio" <(E-Mail Removed)> wrote in message
> news:e$(E-Mail Removed)...
>>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?
>>
>
>