ComponentFactory.Krypton.Toolkit.ViewDrawDocker.CalculateDock C# (CSharp) Méthode

CalculateDock() protected méthode

Find the actual docking to apply for the specified RightToLeft setting.
protected CalculateDock ( ViewDockStyle ds, Control control ) : ViewDockStyle
ds ViewDockStyle Docking style.
control System.Windows.Forms.Control Control for which the setting is needed.
Résultat ViewDockStyle
        protected ViewDockStyle CalculateDock(ViewDockStyle ds, Control control)
        {
            // Do we need to adjust to reflect right to left layout?
            if (CommonHelper.GetRightToLeftLayout(control) && (control.RightToLeft == RightToLeft.Yes))
            {
                // Only need to invert the left and right sides
                switch (ds)
                {
                    case ViewDockStyle.Left:
                        ds = ViewDockStyle.Right;
                        break;
                    case ViewDockStyle.Right:
                        ds = ViewDockStyle.Left;
                        break;
                }
            }

            return ds;
        }