Right to Left layout support

Feb 7, 2014 at 5:56 PM
I was wondering if the CODE framework has a way, or even supports writing right-to-left applications such as those which use Arabic or Hebrew.

If not would you please consider adding support for this.

Awesome job by the way.

Thank you
Feb 8, 2014 at 9:28 AM
Dear abnajjar,
Actually CODE framework using all WPF based features so you can change your view leftToRight writing to RightLeft easily by just adding on the view header
<c:View xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
        xmlns:c="clr-namespace:CODE.Framework.Wpf.Mvvm;assembly=CODE.Framework.Wpf.Mvvm"
        xmlns:Controls="clr-namespace:CODE.Framework.Wpf.Controls;assembly=CODE.Framework.Wpf" 
        
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:Layout="clr-namespace:CODE.Framework.Wpf.Layout;assembly=CODE.Framework.Wpf" xmlns:Converters="clr-namespace:Project.Client.Wpf1.Converters"
        Layout:SimpleView.Title="Login to access this application" 
        FlowDirection="RightToLeft"
        Layout:SimpleView.IconResourceKey="CODE.Framework-Icon-Login" 
        Width="400" Height="400"
        >

please check the msdn blog link :
Developing Arabic applications should be easy!

Happy coding!
Marked as answer by abnajjar on 2/8/2014 at 6:35 AM
Coordinator
Feb 10, 2014 at 9:07 PM
To add one more thought: You can even set the flow direction in a style if you were so inclined. This way, all views will be right-to-left.


Markus
Marked as answer by abnajjar on 3/20/2014 at 4:39 AM
Feb 12, 2014 at 6:46 AM
Edited Feb 12, 2014 at 6:47 AM
That is a great idea, thank you.
Mar 20, 2014 at 12:01 PM
Edited Mar 20, 2014 at 11:12 PM
MarkusEgger wrote:
To add one more thought: You can even set the flow direction in a style if you were so inclined. This way, all views will be right-to-left.


Markus
I tried to do this in App.xaml, Metro.xaml and various other places:

<Style TargetType="{x:Type mvvm:View}">
        <Setter Property="FlowDirection"
                    Value="RightToLeft" />
</Style>
but it isn't affecting anything ?

Another thing, when I set the FlowDirection on individual views locally it works, but the actions rendered
by the styles and the title aren't affected by the flow ?
What is the best way to solve this ?

Thank you very much

Best regards,
Coordinator
Mar 21, 2014 at 7:38 AM
To be perfectly honest: I don't know. I never had a need to do anything with RightToLeft in a WPF app. I would imagine that you could go into the Shell style and set the property there, thus turning everything on the root window into RightToLeft mode, which should affect everything. But I am not totally sure what all the expected changes would be.

Markus
Marked as answer by abnajjar on 3/21/2014 at 7:02 AM
Mar 21, 2014 at 2:56 PM
MarkusEgger wrote:
To be perfectly honest: I don't know. I never had a need to do anything with RightToLeft in a WPF app. I would imagine that you could go into the Shell style and set the property there, thus turning everything on the root window into RightToLeft mode, which should affect everything. But I am not totally sure what all the expected changes would be.

Markus
Thank you, thank you, thank you

I can't say enough.

It worked perfectly, I didn't imagine it would be so smooth and easy.

Greatest regards,
Coordinator
Mar 22, 2014 at 8:44 PM
Great! :-)

Markus