c# - C# Form 中的 RightToLeft 属性

标签 c# winforms internationalization

我想将表单标题、图标和关闭以及帮助按钮从左侧移动到右侧(更改布局)。

我手动移动了表单控件以保留背景图像,但现在我想更改表单标题。

当我在表单属性中将 rightToLeft 属性设置为 yes 并将 rightToLeftLayout 设置为 true 时,背景图像消失,但它使用属性“BackColor”

我的代码如下:

if (_lang == 'Arabic')
{
    this.RightToLeft =  RightToLeft.Yes;
    this.RightToLeftLayout = true;
}

但它保留按钮图像。

那是为什么呢?

最佳答案

为了进一步说明 Blounty 的回答,MSDN 规范明确指出在使用 RightToLeftLayout 时不支持 BackgroundImage、Opacity 和其他:

http://msdn.microsoft.com/en-us/library/system.windows.forms.form.righttoleftlayout(vs.80).aspx :

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.

关于c# - C# Form 中的 RightToLeft 属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/400167/

相关文章:

c++ - 非 unicode 程序和注册表设置的语言

c# - Excel 自动化 : Close event missing

c# - 如何防止窗口标题栏上出现“无响应”消息?

c# - c++ dll结构到c#

c# - Datagridview:如何将单元格设置为编辑模式?

.net - 打开网址发送POST

java - 如何用LWUIT解决本地化问题

javascript - RTL 语言 : comma-separated lists

c# - 运行时 appconfig 值更改

c# - 递归调用方法时防止 System.StackOverflowException