0

I have created an element with Reflection API and give it a caption as:

[Caption("Book title"]
public string Title;

Is it possible to set the caption label programmatically?

1 Answers1

0

Have you tried changing attribute value at runtime ?

   Caption[] attrs=(Caption[]) typeof(MyClass).
          GetCustomAttributes(typeof(Caption), false);
   attrs[0] = new Caption("New caption")

You'll probably have to reload your dialogviewcontroller's data.

Some docs on attributes : http://www.developerfusion.com/article/84326/attributes-of-c/

LukeSkywalker
  • 341
  • 2
  • 7