Click here to Skip to main content
15,894,646 members

Comments by Member 12826412 (Top 4 by date)

Member 12826412 1-Nov-16 10:58am View    
this is the code behind but i want to change in it the flow direction
using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Globalization;
using XamlGeneratedNamespace;
using System.IO;
using System.Xml;
using System.Data;
using Tomers.WPF.Localization;
using System.Resources;

namespace WpfApplication1
{
/// <summary>
/// Interaction logic for Window1.xaml
///
public partial class Window1 : Window
{
string strLanguage = "";
Boolean boolInit = true;

public Window1()
{
InitializeComponent();
boolInit = false;
}
private void Window_Loaded(object sender, RoutedEventArgs e)
{
Set_Language();
}

private void ddlLanguage_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
Set_Language();
}

private void Set_Language()
{
if (boolInit == false)
{
strLanguage = "WpfApplication1.Language." + ((ComboBoxItem)ddlLanguage.SelectedItem).Name.ToString();
ResourceManager LocRM = new ResourceManager(strLanguage, typeof(Window1).Assembly);
lblFirstName.Text = LocRM.GetString("strFirstName");
lblLastName.Text = LocRM.GetString("strLastName");
lblAge.Text = LocRM.GetString("strAge");
lblContact.Text = LocRM.GetString("strContact");
}
}
}
}
Member 12826412 1-Nov-16 10:57am View    
but i tried to make it by resources and it success but still i can't change flow direction when i change the language
Member 12826412 1-Nov-16 10:54am View    
http://www.codeproject.com/Articles/38751/Building-Multilingual-WPF-Applications this way
Member 12826412 1-Nov-16 7:28am View    
thanks