Export (0) Print
Expand All
0 out of 1 rated this helpful - Rate this topic

Form.RightToLeftLayout Property

Note: This property is new in the .NET Framework version 2.0.

Gets or sets a value indicating whether right-to-left mirror placement is turned on.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

[LocalizableAttribute(true)] 
public virtual bool RightToLeftLayout { get; set; }
/** @property */
public boolean get_RightToLeftLayout ()

/** @property */
public void set_RightToLeftLayout (boolean value)

public function get RightToLeftLayout () : boolean

public function set RightToLeftLayout (value : boolean)

Property Value

true if right-to-left mirror placement is turned on; otherwise, false for standard child control placement. The default is false.

The RightToLeftLayout property is primarily useful for developing world-ready forms for worldwide audiences. Many forms are designed so that controls are laid out on a form in a left-to-right fashion. These forms are compatible with languages that follow this writing direction. However, when you display the same forms to users of right-to-left languages, it is often preferable to reverse the order of the controls on the form. If both the RightToLeftLayout and RightToLeft properties are true, mirroring will be turned on for the form, and control placement and text flow will be right-to-left.

Unlike RightToLeft, RightToLeftLayout does not inherit. If you want it to take effect for child controls, you must set it on each child control that you want mirrored.

Owner draw is not supported when RightToLeftLayout is set to Yes. The owner draw events will still occur, but the behavior of any code you author in these events is not defined. Additionally, BackgroundImage, Opacity, TransparencyKey, and the painting events are not supported.

The RightToLeftLayout and RightToLeft properties cause the following Win32 API window styles to be set:

  • When RightToLeft is set to Yes and RightToLeftLayout is set to true, Windows Forms sets the WS_EX_LAYOUTRTL window style, and removes the WS_EX_RIGHT and WS_EX_RTLREADING styles.

  • When RightToLeft is set to Yes but RightToLeftLayout is set to No, Windows Forms sets the WS_EX_RIGHT and WS_EX_RTLREADING window styles.

Changing the value of this property raises the RightToLeftLayoutChanged event.

For more information about globalization issues, see Best Practices for Developing World-Ready Applications.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.