private void AdjustControlsForRightToLeftWritingSystem(Sandbox sandbox)
{
if (sandbox.RightToLeftWritingSystem && btnConfirmChanges.Location.X != 0)
{
panelSandbox.Anchor = AnchorStyles.Right | AnchorStyles.Top;
// make buttons RightToLeft oriented.
btnConfirmChanges.Anchor = AnchorStyles.Left;
btnConfirmChanges.Location = new Point(0, btnConfirmChanges.Location.Y);
btnConfirmChangesForWholeText.Anchor = AnchorStyles.Left;
btnConfirmChangesForWholeText.Location =
new Point(btnConfirmChanges.Width, btnConfirmChangesForWholeText.Location.Y);
btnUndoChanges.Anchor = AnchorStyles.Left;
btnUndoChanges.Location = new Point(
btnConfirmChanges.Width + btnConfirmChangesForWholeText.Width, btnUndoChanges.Location.Y);
btnMenu.Anchor = AnchorStyles.Right;
btnMenu.Location = new Point(panelControlBar.Width - btnMenu.Width, btnMenu.Location.Y);
}
}