wpf WPF Localization

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Insert
> Step 2: And Like the video. BONUS: You can also share it!

Remarks

Content of controls can be localized using Resource files, just as this is possible in classes. For XAML there is a specific syntax, that is different between a C# and a VB application.

The steps are:

  • For any WPF project: make the resource file public, the default is internal.
  • For C# WPF projects use the XAML provided in the example
  • For VB WPF projects use the XAML provided in the example and change the Custom Tool property to PublicVbMyResourcesResXFileCodeGenerator.
  • To select the Resources.resx file in a VB WPF project:
    • Select the project in solution explorer
    • Select "Show all files"
    • Expand My Project


Got any wpf Question?