Beispiel #1
0
        /// <summary>
        /// Get the position of the decoration
        /// </summary>
        /// <param name="decoration">Textdecoration to check</param>
        /// <returns>Position of the decoration</returns>
        private DecoratorAnchor GetDecoratorPosition(TextDecoration decoration)
        {
            if (decoration.GetType() == typeof(TopDecoration))
            {
                return(DecoratorAnchor.Top);
            }
            if (decoration.GetType() == typeof(BottomDecoration))
            {
                return(DecoratorAnchor.Bottom);
            }
            if (decoration.GetType() == typeof(LeftDecoration))
            {
                return(DecoratorAnchor.Left);
            }
            if (decoration.GetType() == typeof(RightDecoration))
            {
                return(DecoratorAnchor.Right);
            }

            return(DecoratorAnchor.Top);
        }