views:

66

answers:

0

Hi,

for localizing purpose I wonder how to databind the text properties of controls e.g. buttons in a C# .NET windows application to an external resource..?

Currently I created a resource, containing a table like

ButtonText1 - "Value1"

ButtonText2 - "Value2"

...

and compiled it as an embedded resource to a DLL. In my windows application I add the DLL as a data source (via the controls property grid) and now the first problem occurs: the embedded resource is available but it offers no data entries (like 'ButtonText1') unless I remove the 'static' modifier from ButtonText1-property in the .Designer.cs file of the resource...

I assume, this is not how it should work .. ;)

Furthermore, if I have bound the controls property to a data entry after removing its static modifier, the binding doesn't seem to work.. nothing changes the bound property, the 'IsBinding' flag of the DataBindings collection entry stays false.

So, how is it possible to assign values of an external resource file compiled to a DLL to the properties of .NET windows form controls..?

Thank your very much.

kind regards M.I.