Sample using Language property .
<Window x:Class="Gekka.WpfApplication1.MainWindow1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Gekka.WpfApplication1"
mc:Ignorable="d"
Title="MainWindow2" Width="200" FontSize="16" SizeToContent="Height">
<StackPanel >
<FrameworkElement.FlowDirection>
<Binding ElementName="combo1" Path="SelectedItem">
<Binding.Converter>
<local:FlowDirectionConverter />
</Binding.Converter>
</Binding>
</FrameworkElement.FlowDirection>
<ListView ItemsSource="{Binding}" Height="100" >
<ListView.View>
<GridView>
<GridView.Columns>
<GridViewColumn Header="Title" DisplayMemberBinding="{Binding Path=Title}" />
<GridViewColumn Header="CreatedAt"
DisplayMemberBinding="{Binding Path=CreatedAt,StringFormat=d}" />
</GridView.Columns>
</GridView>
</ListView.View>
</ListView>
<ComboBox x:Name="combo1" SelectedItem="{Binding RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=Window},Path=Language}">
<ComboBox.ItemsSource>
<x:Array Type="{x:Type x:XmlLanguage}">
<x:XmlLanguage>ar-ae</x:XmlLanguage>
<x:XmlLanguage>en-us</x:XmlLanguage>
<x:XmlLanguage>fr-fr</x:XmlLanguage>
<x:XmlLanguage>ja-jp</x:XmlLanguage>
</x:Array>
</ComboBox.ItemsSource>
</ComboBox>
</StackPanel>
</Window>
namespace Gekka.WpfApplication1
{
using System;
using System.Globalization;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
public partial class MainWindow1 : Window
{
public MainWindow1()
{
InitializeComponent();
this.Language = System.Windows.Markup.XmlLanguage.GetLanguage(System.Globalization.CultureInfo.CurrentUICulture.IetfLanguageTag);
this.DataContext = new Note[] { new Note() };
}
class Note
{
public string Title { get; set; } = "Test";
public DateTime? CreatedAt { get; set; } = DateTime.Now;
}
}
class FlowDirectionConverter : System.Windows.Data.IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value is System.Windows.Markup.XmlLanguage xl)
{
value = xl.GetEquivalentCulture();
}
if (value is System.Globalization.CultureInfo ci)
{
if (ci.TextInfo.IsRightToLeft)
{
return FlowDirection.RightToLeft;
}
}
return FlowDirection.LeftToRight;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}