Hi,
I would like to change the display (XafDisplayName attribute) name of one of my businessclass. It has a string property, and I also would like to change the display name for it.
This is the constructor of my class, where I'm trying to achieve it:
C#public PopUpTextEdit(Session session, string formCaption, string textCaption) : base(session)
{
this.ClassInfo.AddAttribute(new XafDisplayNameAttribute(formCaption));
this.ClassInfo.GetMember("Text").AddAttribute(new XafDisplayNameAttribute(textCaption));
}
But this approach does not work. Can you tell me what do I do wrong? Or how can I change those properties dinamically. This class is btw a non-persistent class, but I don't think it makes any difference.
Thanks in advance!
Maybe I have to rephrase my question to the following: How to add/edit class or property attributes dynamically at the constructor of the business class (or at any of the init events)?