I have a windows project (C#) which we are going to use for Arabia. As we know the country following Right to Left mechanism. How can i move my all controls position in pane
You can do two of the things :
Firstly, in Web.config
file of the web application, set the culture attribute of the <globalisation>
element to 'ar-SA'
Secondly, Set the HTML dir attribute for the element of each page to"rtl"
Facts about RightToLeftLayout:
so according to second point you need to set it to all individual child elements
you can use this control :)
class MyPanel:Panel
{
private bool myRightToLeftLayout=false;
public bool MyRightToLeftLayout
{
get { return myRightToLeftLayout; }
set
{
if (value != myRightToLeftLayout)
{
foreach (Control item in base.Controls)
{
try
{
item.RightToLeft = value==true?RightToLeft.No:RightToLeft.Yes;
item.Location = new System.Drawing.Point(base.Size.Width - item.Size.Width - item.Location.X, item.Location.Y);
}
catch { }
}
myRightToLeftLayout = value;
}
}
}
}
and the result like this
MyRightToLeftLayout = false
MyRightToLeftLayout = true