开发者

Switch between LTR and RTL User-Interface in WPF Windows Applications

开发者 https://www.devze.com 2023-04-04 00:38 出处:网络
I want to create an application by WPF 4开发者_运维知识库, my application must support multilingual user interface such as English and Arabic language and must be able to switch between LTR AND RTL UI

I want to create an application by WPF 4开发者_运维知识库, my application must support multilingual user interface such as English and Arabic language and must be able to switch between LTR AND RTL UI and rearrange the UI elements.

Is there any way to do this like windows application localization in the past (I mean use resource files to store size and position of elements) or I must use new methods to do this in WPF?


You can use resource files to store some of the information (such as localizable strings), but it's typically better to switch to using locale specific xaml compiled into satellite assemblies for the user interface design.

This has some huge benefits over the traditional Windows Forms-style localization - especially with RTL user interfaces. Typically, switching to RTL really should change your UI, not just some basic positioning, but the layout often should change as a result. In these cases, WPF's new approaches allow you to completely replace the xaml for a locale if required.

For details, see WPF Globalization and Localization.

0

精彩评论

暂无评论...
验证码 换一张
取 消