|
using System.Reflection;
using System.Resources;
using System.Windows;
using IO=System.IO;
namespace WPF_Localize
{
public partial class Window1 : System.Windows.Window
{
private ResourceManager rm;
public Window1()
{
InitializeComponent();
string baseName = IO.Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location);
rm = new ResourceManager(baseName + ".Strings", typeof(App).Assembly);
}
private void OnButtonClick(object sender, RoutedEventArgs e)
{
MessageBox.Show(rm.GetString("String1"));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I was born and grew up in Northern Germany grew up in Quebec in a French Language environment. I finished High School in Fergus, Ontario. After a 4 year training as a Pipe Organ Builder in Germany, I returned to Canada to get a B.Sc. in Computer Science. I'm currently working for a company called AB SCIEX working on Mass Spectrometer Software, am married, and have three often wonderful children. What you believe in matters - I am a follower of Jesus Christ - we attend a German-Lutheran congregation in downtown
Toronto.