ComponentFactory.Krypton.Docking.DockingHelper.OrientationFromDockEdge C# (CSharp) Method

OrientationFromDockEdge() public static method

Convert the DockEdge to Orientation enumeration value.
public static OrientationFromDockEdge ( DockingEdge edge ) : Orientation
edge DockingEdge DockEdge value to convert.
return Orientation
        public static Orientation OrientationFromDockEdge(DockingEdge edge)
        {
            switch (edge)
            {
                case DockingEdge.Left:
                case DockingEdge.Right:
                    return Orientation.Vertical;
                default:
                    return Orientation.Horizontal;
            }
        }

Usage Example

 /// <summary>
 /// Initialize a new instance of the KryptonDockspaceSeparator class.
 /// </summary>
 /// <param name="edge">Docking edge the separator is against.</param>
 /// <param name="opposite">Should the separator be docked against the opposite edge.</param>
 public KryptonDockspaceSeparator(DockingEdge edge, bool opposite)
 {
     // Setup docking specific settings for the separator
     Dock           = DockingHelper.DockStyleFromDockEdge(edge, opposite);
     Orientation    = DockingHelper.OrientationFromDockEdge(edge);
     SeparatorStyle = SeparatorStyle.LowProfile;
 }