Reputation: 21
While working on localizing my WPF-c# app for Right-to-Left language (=RTL, In my case it's hebrew) -
I have come around a problem I can't find any reference on anywhere on MSDN or google and therefore no answer. Needless to say I'm new to programming...
My code is a bit long so I'll try and explain the main problem in words.
In my app, I have a window (not a MainWindow) containing a StackPanel
. Inside I've nested a TabControl
with 3 tab items, each of them containing a different UserControl
I've pointing to. Each one of them has a different size.
On the same window I set the Window property SizeToContent="WidthAndHeight"
.
The app works great while on the default Left-to-right setting, and when
I change the FlowDirection
in c# (also tried in XAML) to right to left it also works OK except of this:
When starting the app and moving between the tabs, the window is resizing, BUT it keeps sizing the window to the top-left position. I.e the top left stays anchored in place while the rest of the window sizes according to the content (this is great when working in LeftToRight
UI but it's annoying and hard to use on RTL UI because the tabs headers keep moving).
Is there a way to change the window's sizing direction so that on RTL UI the window will size toward the top-right? Am I doing something wrong?
Upvotes: 1
Views: 315