Search Results for

    Show / Hide Table of Contents

    Class Shadow

    Represents the shadow effect applied to text or objects in a Word document.

    Inheritance
    System.Object
    Shadow
    Namespace: IronWord.Models
    Assembly: IronWord.dll
    Syntax
    public class Shadow : Object

    When text in a Word document should cast a dark, offset copy behind it, Shadow describes that effect. It is the drop shadow a developer applies to lift type off the page, the soft dark echo that gives a heading depth. A developer styling a document reaches for it when flat text needs emphasis, and it is the effect paired with Reflection, which mirrors the text rather than darkening a copy behind it.

    A shadow is set as the ShadowEffect on a TextEffect, so it is configured as part of a text style's effects rather than on its own. Build the shadow's blur, color, and offset once, attach it to the text effect, and the dark copy renders wherever that styled text appears. The OuterShadow1 field offers a ready-made outer-shadow preset as a convenient starting point.

    BlurRadius softens the shadow's edge and DistanceFromText sets how far it falls from the original, while DirectionAngle and Alignment orient where it lands. SchemeColor tints the shadow, and the skew and scaling properties (HorizontalSkewAngle, VerticalSkewAngle, HorizontalScalingFactor, VerticalScalingFactor) shear and size the offset copy for a slanted or stretched effect. Because Word measurements can be expressed in several units, SetBlurRadius and SetDistanceFromText take a value plus a MeasurementUnit, and GetBlurRadius and GetDistanceFromText read those values back in a chosen unit. Prefer the Set methods over the raw BlurRadius and DistanceFromText properties whenever the unit matters, so the dimension is recorded with its unit rather than as a bare number.

    using IronWord.Models;
    using IronWord.Models.Enums;
    
    var shadow = new Shadow();
    shadow.SetBlurRadius(3, MeasurementUnit.Point);
    shadow.SetDistanceFromText(2, MeasurementUnit.Point);
    shadow.DirectionAngle = 45;

    The shadow text effect how-to walks through applying it, the reflection text effect how-to covers the mirrored counterpart, and the glow text effect how-to shows another text effect.

    Constructors

    Shadow()

    Create a Shadow instance.

    Declaration
    public Shadow()

    Fields

    OuterShadow1

    Create a predefined outer shadow effect instance.

    Declaration
    public static Shadow OuterShadow1
    Field Value
    Type Description
    Shadow

    Properties

    Alignment

    Gets or sets the alignment of the shadow.

    Declaration
    public RectangleAlignmentValues Alignment { get; set; }
    Property Value
    Type Description
    RectangleAlignmentValues

    BlurRadius

    Gets or sets the blur radius of the shadow effect.

    Declaration
    public double BlurRadius { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The blur radius is specified in points (1/72 inch).

    DirectionAngle

    Gets or sets the direction angle of the shadow effect.

    Declaration
    public double DirectionAngle { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The direction angle is specified in degrees.

    DistanceFromText

    Gets or sets the distance of the shadow effect from the text or object.

    Declaration
    public double DistanceFromText { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The distance is specified in points (1/72 inch).

    HorizontalScalingFactor

    Gets or sets the horizontal scaling factor of the shadow effect.

    Declaration
    public int HorizontalScalingFactor { get; set; }
    Property Value
    Type Description
    System.Int32

    HorizontalSkewAngle

    Gets or sets the horizontal skew angle of the shadow effect.

    Declaration
    public double HorizontalSkewAngle { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The skew angle is specified in degrees.

    SchemeColor

    Gets or sets the scheme color of the shadow effect.

    Declaration
    public Color SchemeColor { get; set; }
    Property Value
    Type Description
    Color

    VerticalScalingFactor

    Gets or sets the vertical scaling factor of the shadow effect.

    Declaration
    public double VerticalScalingFactor { get; set; }
    Property Value
    Type Description
    System.Double

    VerticalSkewAngle

    Gets or sets the vertical skew angle of the shadow effect.

    Declaration
    public double VerticalSkewAngle { get; set; }
    Property Value
    Type Description
    System.Double
    Remarks

    The skew angle is specified in degrees.

    Methods

    GetBlurRadius(MeasurementUnit)

    Gets the blur radius of the shadow effect in the specified measurement unit.

    Declaration
    public double GetBlurRadius(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert the blur radius to.

    Returns
    Type Description
    System.Double

    The blur radius of the shadow effect.

    GetDistanceFromText(MeasurementUnit)

    Gets the distance of the shadow effect from the text or object in the specified measurement unit.

    Declaration
    public double GetDistanceFromText(MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    MeasurementUnit measurementUnit

    The measurement unit to convert the distance to.

    Returns
    Type Description
    System.Double

    The distance of the shadow effect from the text or object.

    SetBlurRadius(Double, MeasurementUnit)

    Sets the blur radius of the shadow effect to the specified value in the specified measurement unit.

    Declaration
    public void SetBlurRadius(double blurRadius, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double blurRadius

    The blur radius of the shadow effect.

    MeasurementUnit measurementUnit

    The measurement unit of the specified blur radius.

    SetDistanceFromText(Double, MeasurementUnit)

    Sets the distance of the shadow effect from the text or object to the specified value in the specified measurement unit.

    Declaration
    public void SetDistanceFromText(double distance, MeasurementUnit measurementUnit)
    Parameters
    Type Name Description
    System.Double distance

    The distance of the shadow effect from the text or object.

    MeasurementUnit measurementUnit

    The measurement unit of the specified distance.

    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    %s requires a valid license key for further deployment. Get Trial Below.
    ironsuite
    Blue key in circleGet Started for Free
    30 days full access • No credit card required
    Test in a live environment

    Test in production without watermarks.
    Works wherever you need it to.

    Fully-functional product

    Get 30 days of fully functional product.
    Have it up and running in minutes.

    24/5 technical support

    Full access to our support engineering team during your product trial

    Grey key in circleGet Started for Free
    The trial form was submitted successfully.
    Grey check in circleTrial key delivered
    Your key has been issued and sent to your email.
    Calendar in circleBook Free Live Demo
    No cards • no pitches • no commitments Pick a time for a quick, personalized demo
    Get the most out of your 30-day trial with:

    Live product and key features walk-through

    Project-specific recommendations

    All your questions answered

    Grey key in circleBook Free Live Demo
    Your booking has been completed Check your e-mail for confirmation

    Want to deploy Iron Suite
    to a live project for FREE?

    What’s included?

    • Test in production without watermarks
    • 30 days fully functional product
    • 24/5 technical support during trial
    ironpdf Logo
    ironword Logo
    ironxl Logo
    ironppt Logo
    ironocr Logo
    ironbarcode Logo
    ironqr Logo
    ironprint Logo
    ironzip Logo
    ironwebscraper Logo
    Iron Software sales team
    Online 24/5
    Have Enterprise licensing requirements?
    Request Iron Suite Enterprise trial
    Key in blue circle

    Get your free 30-day Trial Key instantly

    Your trial license will be sent to your email address

    No limitations. 100% unlocked. No credit card.

    bullet_checkedNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Or
    Key in blue circle

    Complete Your Trial Key Signup

    Tell us a little more about yourself.

    Key in blue circleNo credit card or account creation requiredNo limitations. 100% unlocked. No credit card.
    Key in blue circle

    Your license key has been delivered to your inbox

    Can't find it? Check your spam folder.

    What’s next?
    Install with NuGet
    Add IronWord to your project
    Quickstart Guide
    Helpful resources to get started

    Need help getting started?

    Book a Free Live Demo

    See IronWord in action and get your licensing questions answered, or

    Key in blue circle

    Your demo request is in.

    You'll receive an invite via email shortly.

    What’s next?
    Explore Documentation
    Review Licensing Options
    badge_greencheck_in_yellowcircle
    Thank you
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com
    • Logo Aetna
    • Logo NASA
    • Logo GE
    • Logo Porsche
    • Logo USDA
    • Logo Qatar
    Join Millions of Engineers who’ve tried IronWord
    Your trial key should be in the email.
    If it is not, please contact support@ironsoftware.com