I have a dependency property in a custom control which has the following attribute to enable the property to appear under a specific category in the properties viewer with a relevant description.
<Category("Vtl Button Images"), Description("Add an image of your choice or leave blank to utilise the default image supplied.")>
Public Property SaveImage As ImageSource
Now I would like to localise the description element of the attribute so I added a resource string to the project and attempteted to reference it like so.
<Category("Vtl Button Images"), Description(My.Resources.ImageDescription)>
Public Property SaveImage As ImageSource
However this throws an error telling me that a constant expression is required. I get the same error if I try and create a constant set to a resource.
So is it possible to localise the description element of attributes like this and if so how?