Flow direction issues

8 posts, 0 answers
  1. Roy Graham
    Roy Graham avatar
    4 posts
    Member since:
    Jul 2009

    Posted 13 Jan 2011 Link to this post

    I am using the date time picker in a multi language application. I have used the cultural support to nicely change the tecxt within the control (apart from the close button and clock header - which I have changed in the template).
    However in the right to left languages, when the picker is opened it appears disconnected from the control.
    I have tried to adjust the RenderTransformOrigin at various places, but have not managed to alter this behaviour.
    (See attached images for visuals in english and arabic)
    Any advice?
  2. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 17 Jan 2011 Link to this post

    Hello Roy Graham,

    Can you send us the definition of the picker and the arabic culture you are using in your application.

    All the best,
    Kaloyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. DevCraft banner
  4. Roy Graham
    Roy Graham avatar
    4 posts
    Member since:
    Jul 2009

    Posted 17 Jan 2011 Link to this post

    Here is a cut down version that exhibits the problem.
    <UserControl x:Class="TelerikTest_Rtl.MainPage"
        xmlns:System="clr-namespace:System;assembly=mscorlib" 
        mc:Ignorable="d"
        Height="300" Width="400">
      
          
        <Grid x:Name="LayoutRoot" Background="White" Margin="30,15,30,15">
            <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" MinWidth="150"/>
                    <ColumnDefinition Width="10"/>
                    <ColumnDefinition Width="Auto" MinWidth="150"/>
                    <ColumnDefinition Width="*"/>
                </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="25"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="25"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
      
            <TextBlock Grid.Column="0" Grid.Row="0" Text="Description" />
            <TextBox Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="4" x:Name="descBox" />
              
            <TextBlock Grid.Column="0" Grid.Row="2" Text="Date 1" />
            <telerik:RadDateTimePicker Grid.Column="0" Grid.Row="3" x:Name="startBox" Height="26" />
              
            <TextBlock Grid.Column="2" Grid.Row="2" Text="Date 2"/>
            <telerik:RadDateTimePicker Grid.Column="2" Grid.Row="3" x:Name="endBox" Height="26" />
      
            <Button Grid.Column="2" Grid.Row="5" Content="ChangeCulture" Click="Button_Click" />
        </Grid>
    </UserControl>

    using System.Windows;
    using System.Windows.Controls;
    using System.Globalization;
    using System.Reflection;
      
    namespace TelerikTest_Rtl
    {
        public partial class MainPage : UserControl
        {
            private bool isArabic = false;
      
            public MainPage()
            {
                InitializeComponent();
            }
      
            private void Button_Click(object sender, RoutedEventArgs e)
            {
                string code = "en-GB";
                isArabic = !isArabic;
                if (isArabic)
                {
                    code = "ar-AE";
                }
                CultureInfo ci = new CultureInfo(code);
                endBox.Culture = ci;
                startBox.Culture = ci;
                ApplyFlowDirection(isArabic);
            }
      
            private void ApplyFlowDirection(bool isRTL)
            {
                var d = LayoutRoot as DependencyObject;
                PropertyInfo pInfo = d.GetType().GetProperty("FlowDirection");
      
                if (pInfo == null)
                    return;
                FlowDirection flow = (isRTL) ? FlowDirection.RightToLeft : FlowDirection.LeftToRight;
                pInfo.SetValue(d, flow, null);
            }
        }
    }

    No style changes applied. Using ar-AE to produce the culture.
  5. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 19 Jan 2011 Link to this post

    Hi Roy Graham,

    I am attaching some images of a test app with your code included in it. I can't see any problems with the popup location in the arabic culture. Can you confirm if the same view is at your site.

    Best wishes,
    Kaloyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  6. Roy Graham
    Roy Graham avatar
    4 posts
    Member since:
    Jul 2009

    Posted 02 Feb 2011 Link to this post

    Sorry for the delay in replying, I got bumped into some other work.

    The two images you posted show the exact issue. (THe extent of the problem depends on screen sizes etc).
    In the english version the week number column is aligned with the start of the date entry field.
    In the arabic version it has shifted to starting almost at the end of the date entry field.

    (I would summize that the transform origin is being set some point away from the horizontal centre of the pop-up. I did try and set this myself but it had no effect.)
  7. Kaloyan
    Admin
    Kaloyan avatar
    920 posts

    Posted 04 Feb 2011 Link to this post

    Hello Roy Graham,

    The issue appears when zooming the browser. We will log the issue in our TFS system an try to fix it as soon as possible.

    Best wishes,
    Kaloyan
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  8. Mike
    Mike avatar
    2 posts
    Member since:
    Apr 2011

    Posted 26 Apr 2011 Link to this post

    Hi,
    Can you let me know if there is an expected date on when this issue is to be resolved.
    Many Thanks
    Mike
  9. Yana
    Admin
    Yana avatar
    4554 posts

    Posted 29 Apr 2011 Link to this post

    Hello Mike,

    I'm afraid that we cannot commit a specific date for resolving this issue as it appeared to be more complicated than we initially thought. We're sorry for the inconvenience.

    Greetings,
    Yana
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Back to Top
DevCraft banner