Search code examples
wpflocalizationcustom-controlsresxlocbaml

What is the best way of localization LOCBaml or Resx based localization?


I came through this What is the best way to localize a WPF application, sans LocBAML? . But, this didn't answer what I'm looking for.

I'm creating a CustomControl in WPF. I would like to provide localization support. The control contains, images, strings etc.,

Any help would be greatly appreciated.

Thanks


Solution

  • I think the document linked in this post contains a lot of information about localization in WPF. In the end, it is up to you to decide which mechanism to use.

    Since you are talking about a custom control, I would consider to give it a Culture dependency property which the consumer of your control can use to specify the desired culture. This way, the consumer can use your localized control, relatively independent of the localization strategy he/she chose.