Exemple #1
0
        /// <summary>
        ///     Returns whether or not an enumeration instance a valid value.
        ///     This method is designed to be used with ValidateValueCallback, and thus
        ///     matches it's prototype.
        /// </summary>
        /// <param name="valueObject">
        ///     Enumeration value to validate.
        /// </param>
        /// <returns> 'true' if the enumeration contains a valid value, 'false' otherwise. </returns>
        public static bool IsTextDecorationUnitValid(object valueObject)
        {
            TextDecorationUnit value = (TextDecorationUnit)valueObject;

            return((value == TextDecorationUnit.FontRecommended) ||
                   (value == TextDecorationUnit.FontRenderingEmSize) ||
                   (value == TextDecorationUnit.Pixel));
        }
Exemple #2
0
 public ImmutableTextDecoration(TextDecorationLocation location, ImmutablePen pen,
                                TextDecorationUnit penThicknessUnit,
                                double penOffset, TextDecorationUnit penOffsetUnit)
 {
     Location         = location;
     Pen              = pen;
     PenThicknessUnit = penThicknessUnit;
     PenOffset        = penOffset;
     PenOffsetUnit    = penOffsetUnit;
 }
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="location">The location of the text decoration</param>
 /// <param name="pen">The pen used to draw this text decoration</param>
 /// <param name="penOffset">The offset of this text decoration to the location</param>
 /// <param name="penOffsetUnit">The unit of the offset</param>
 /// <param name="penThicknessUnit">The unit of the thickness of the pen</param>
 public TextDecoration(
     TextDecorationLocation location,
     Pen                    pen,
     double                 penOffset,
     TextDecorationUnit     penOffsetUnit,
     TextDecorationUnit     penThicknessUnit
     )
 {
     Location         = location;
     Pen              = pen;
     PenOffset        = penOffset;
     PenOffsetUnit    = penOffsetUnit;
     PenThicknessUnit = penThicknessUnit;        
 }      
 public TextDecoration(TextDecorationLocation location, System.Windows.Media.Pen pen, double penOffset, TextDecorationUnit penOffsetUnit, TextDecorationUnit penThicknessUnit)
 {
 }
 public TextDecoration(TextDecorationLocation location, System.Windows.Media.Pen pen, double penOffset, TextDecorationUnit penOffsetUnit, TextDecorationUnit penThicknessUnit)
 {
 }