Ext.Net.Fx.AnchorConvert C# (CSharp) Method

AnchorConvert() private method

private AnchorConvert ( AnchorPoint anchor ) : string
anchor AnchorPoint
return string
        public static string AnchorConvert(AnchorPoint anchor)
        {
            switch (anchor)
            {
                case AnchorPoint.TopLeft:
                    return "tl";
                case AnchorPoint.Top:
                    return "t";
                case AnchorPoint.TopRight:
                    return "tr";
                case AnchorPoint.Left:
                    return "l";
                case AnchorPoint.Center:
                    return "c";
                case AnchorPoint.Right:
                    return "r";
                case AnchorPoint.BottomLeft:
                    return "bl";
                case AnchorPoint.Bottom:
                    return "b";
                case AnchorPoint.BottomRight:
                    return "br";
                default:
                    throw new ArgumentOutOfRangeException("anchor");
            }
        }
    }

Usage Example

 public override string ToString()
 {
     return(Fx.AnchorConvert(this.ElementAnchor)
            .ConcatWith("-")
            .ConcatWith(Fx.AnchorConvert(this.TargetAnchor))
            .ConcatWith(this.ConstrainViewport ? "?" : ""));
 }
All Usage Examples Of Ext.Net.Fx::AnchorConvert