在c#中修复镜像显示的tabPage

Fixing mirror displayed tabPage in c#

我用过这个Metro.dll to create the following TabControl
I want tabPages displayed as right to left on the top,
But when i do it the text on the tab page displayed as mirrored as shown in the following Image



如何解决这个问题?

经过一番调查,Windows 表单控件库的源代码似乎位于 GitHub。下载并在您的机器上构建它。

查看 MetroTabControl class,它似乎是基本 Microsoft 选项卡控件的扩展选项卡控件。特别是,寻找 TextRenderer.DrawText(graphics, tabPage.Text, EffectiveFont, tabRect, EffectiveForeColor, EffectiveBackColor, TextAlign.AsTextFormatFlags() | TextFormatFlags.EndEllipsis); 方法。

这里的重要参数是 TextFormatFlags and it needs to be set to TextFormatFlags.RightToLeft | TextFormatFlags.Right when the tab control is mirrored or RightToLeft and RightToLeftLayout 设置为 YesTrue

原来是库源码疏忽,大家可以根据自己的需要修改,最后提交pull request给project owner。