Home All Groups Group Topic Archive Search About

Changing the DescriptionAttribute value

Author
25 Jan 2006 4:03 PM
Mario Vázquez
How can I change the value of the DescriptionAttribute depending on the
CultureInfo context?

[ Description( "Description for the property at design-time") ]
public object TestProperty
{
    get{ return this.testProperty; }
    set{ this.testProperty = value; } string testProperty;
}

I've try to change the string in the attribute accessing an item from a
resource file, but attribute values only accept constant values.

Thanks,
Mario Vazquez

Author
27 Jan 2006 8:43 AM
jokiz
subclass the DescriptionAttribute class whose constructor parameter you
will pass the resource key.  Override the Description property to
return the string obtained from the resource file.

OT:  are you the idol singer last year? :p
Author
27 Jan 2006 10:15 AM
Mario Vázquez
Aha, I'll try.
Thanks

PD: I'm not any famous singer (what a pitty!)


Show quote
"jokiz" <joeycali***@gmail.com> escribió en el mensaje
news:1138351398.878970.220240@g47g2000cwa.googlegroups.com...
> subclass the DescriptionAttribute class whose constructor parameter you
> will pass the resource key.  Override the Description property to
> return the string obtained from the resource file.
>
> OT:  are you the idol singer last year? :p
>

AddThis Social Bookmark Button