你好 有什么方法可以获取当前文化的 FlowDirection。
我设置了一个属性,比如
public string FlowDirection
{
get {
return // should return the flow direction using Thread.CurrentThread.CurrentUICulture.
}
}
我不想像这样硬编码
if (currentLanguage.ToLower().StartsWith("ar"))
{
return FlowDirection.RightToLeft;
}
else
{
return FlowDirection.LeftToRight;
}
最佳答案
使用这个:CultureInfo.TextInfo.IsRightToLeft
关于c# - 在 C# 中从 CurrentCulture 中查找流向,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4791390/