/// <summary>
        /// Returns drawing pen.
        /// <remarks>We are use empty pen only like parameter of method Draw().</remarks>
        /// </summary>
        /// <returns>Pen.</returns>
        public static Pen GetPen()
        {
            if (_pen == null)
            {
                _pen = new Pen();
                _pen = (Pen)_pen.GetCurrentValueAsFrozen();
            }

            return(_pen);
        }
Example #2
0
        private static object CoerceGridlinesPen(DependencyObject objWithOldDP, object newDPValue)
        {
            Pen newPenValue = (Pen)newDPValue;

            return(newPenValue.IsFrozen ? newDPValue : newPenValue.GetCurrentValueAsFrozen());
        }