How to Add Reflection Effect to Text in C# | IronWord

How to Add Reflection Effect to Text in C

Apply a mirror-like reflection effect to text in C# using IronWord's simple API. Create professional text reflections with one line of code, simulating text reflected on a surface for enhanced visual depth.

Quickstart: Apply Reflection Effect to Text in C#

With just one line of code using IronWord, you can apply a preset reflection effect to any text. Get started instantly—no complex setup or boilerplate code needed.

Nuget IconGet started making PDFs with NuGet now:

  1. Install IronWord with NuGet Package Manager

    PM > Install-Package IronWord

  2. Copy and run this code snippet.

    new IronWord.WordDocument().AddText("Quick Text").Style = new IronWord.Models.TextStyle(){ TextEffect = new IronWord.Models.TextEffect(){ ReflectionEffect = new IronWord.Models.Reflection() } };
  3. Deploy to test on your live environment

    Start using IronWord in your project today with a free trial
    arrow pointer

How Do I Add a Reflection Effect?

To specify the reflection effect for the text, create the TextStyle object and populate the ReflectionEffect property with a Reflection object. Finally, add new text with the style by assigning the TextStyle object to the TextEffect property.

Reflection effects enhance document presentation by adding depth and visual interest to important text elements. This effect works particularly well for headers, titles, and emphasizing key information in professional documents. The reflection simulates text sitting on a glossy surface, creating an elegant and modern appearance that draws the reader's attention.

Why Does Creating a TextStyle Matter?

The TextStyle object serves as the central configuration point for all text formatting in IronWord. By separating style from content, you can reuse the same reflection effect across multiple text elements, ensuring consistency throughout your document. This approach also makes it easy to update the reflection effect globally by modifying a single style object.

:path=/static-assets/word/content-code-examples/how-to/text-effect-reflection-effect.cs
using IronWord;
using IronWord.Models;

// Create new Word document
WordDocument doc = new WordDocument();

// Create and configure text style
TextStyle textStyle = new TextStyle();
textStyle.TextEffect = new TextEffect()
{
    ReflectionEffect = new Reflection(),
};

// Add text with style
doc.AddText("Hello World").Style = textStyle;

// Export new Word document
doc.SaveAs("reflectionEffect.docx");
$vbLabelText   $csharpLabel

What Does the Default Reflection Look Like?

The default reflection effect creates a subtle mirror image below the text with automatic opacity fade. This preset configuration works well for most business documents and presentations without requiring any additional customization. The reflection appears at a standard distance with appropriate blur and transparency settings that complement various font sizes and styles.

Microsoft Word showing 'Hello World' text with reflection effect creating mirrored semi-transparent copy below

What Properties Can I Configure for Reflection Effects?

The reflection effect provides a range of adjustable attributes to meet diverse design requirements. Understanding these properties allows you to create unique visual effects tailored to your specific document style. Each property controls a different aspect of the reflection, from its position and angle to its transparency and color. See the following list for detailed descriptions of each property:

Which Properties Control the Reflection Appearance?

  • SchemeColor: Gets or sets the scheme color of the reflection effect. Tint reflections with any color for water or metallic surface effects.

  • HorizontalSkewAngle: Gets or sets the horizontal skew angle in degrees. Create perspective effects where reflections recede into the distance.

  • HorizontalScalingFactor: Gets or sets the horizontal scaling factor. Values below 100 compress; values above 100 stretch.

  • DistanceFromText: Gets or sets the distance in points (1/72 inch). Smaller values create tight reflections; larger values simulate distant surfaces.

  • DirectionAngle: Gets or sets the direction angle in degrees. Determines the apparent light source direction.

  • FadeDirectionAngle: Gets or sets the fade direction in degrees. Control vertical fading for floor reflections or angled fading for water effects.

  • EndPosition: Gets or sets the ending position. Determines where the reflection completely fades out.

  • StartPosition: Gets or sets the starting position. Typically 0 to begin immediately below the text.

  • EndingOpacity: Gets or sets the ending opacity. Lower values create subtle reflections that fade to transparency.

  • VerticalScalingFactor: Gets or sets the vertical scaling factor. Negative values flip text; magnitude controls height.

  • StartingOpacity: Gets or sets the starting opacity. Higher values create stronger initial reflections.

  • Alignment: Gets or sets the alignment. Choose from various options to position the reflection relative to text.

  • BlurRadius: Gets or sets the blur radius in points (1/72 inch). Higher values create softer, more diffused reflections.

  • VerticalSkewAngle: Gets or sets the vertical skew angle in degrees. Use for creating slanted reflection effects.

How Do I Create a Custom Reflection Effect?

Custom reflection effects allow you to match your organization's branding or create unique visual styles. The following example demonstrates a gold-tinted reflection with specific positioning and opacity settings that create a professional appearance for certificates, awards, or premium document headers.

:path=/static-assets/word/content-code-examples/how-to/text-effect-customized-reflection-effect.cs
using IronWord;
using IronWord.Models;
using IronWord.Models.Enums;

// Create new Word document
WordDocument doc = new WordDocument();

// Create and configure text style
TextStyle textStyle = new TextStyle();
textStyle.TextEffect = new TextEffect()
{
    ReflectionEffect = new Reflection()
    {
        Alignment = RectangleAlignmentValues.BottomLeft,
        BlurRadius = 5,
        DirectionAngle = 90,
        DistanceFromText = 5,
        EndingOpacity = 100,
        EndPosition = 10,
        FadeDirectionAngle = 90,
        HorizontalScalingFactor = 100,
        HorizontalSkewAngle = 0,
        SchemeColor = IronWord.Models.Color.Gold,
        StartingOpacity = 0,
        StartPosition = 0,
        VerticalScalingFactor = -100,
        VerticalSkewAngle = 0,
    },
};

// Add text with style
doc.AddText("Customized reflection").Style = textStyle;

// Export new Word document
doc.SaveAs("customizedReflectionEffect.docx");
$vbLabelText   $csharpLabel

What Results Can I Achieve with Custom Properties?

The customized reflection example above produces a distinctive gold-tinted reflection that enhances the premium feel of the document. By adjusting the opacity gradient from 0% to 100%, the reflection creates a reverse-fade effect where the reflection becomes stronger as it moves away from the text. This technique works well for creating prominent headers or highlighting important announcements.

Word document showing 'Customized reflection' text with gray mirrored reflection effect applied

Best Practices for Reflection Effects

When implementing reflection effects in professional documents, consider these guidelines:

Subtlety Often Works Best: For business documents, use lower ending opacity values (20-40%) to create subtle reflections that enhance without distracting. Reserve stronger effects for marketing materials or presentations where visual impact is paramount.

Match Your Document Style: Align reflection properties with your document's overall design. Formal documents benefit from simple vertical reflections with minimal blur, while creative materials can utilize skewed angles and colored reflections for artistic effect.

Performance Considerations: Complex reflection effects with high blur radius values may increase file size and processing time. For documents with numerous reflected elements, test performance and adjust properties accordingly.

Accessibility Awareness: Remember that decorative effects like reflections should enhance rather than replace clear communication. Ensure your primary text remains highly readable, especially when creating documents that need to meet accessibility standards.

Frequently Asked Questions

How do I add a reflection effect to text in C#?

With IronWord, you can add a reflection effect by creating a TextStyle object and populating the ReflectionEffect property with a Reflection object. Simply instantiate the Reflection class and assign it to your text style - IronWord handles all the complex rendering automatically.

What is the simplest way to apply a text reflection effect?

The quickest method is using IronWord's one-line implementation: new IronWord.WordDocument().AddText("Your Text").Style = new IronWord.Models.TextStyle(){ TextEffect = new IronWord.Models.TextEffect(){ ReflectionEffect = new IronWord.Models.Reflection() } }. This applies a default reflection effect instantly.

Can I customize the reflection effect properties?

Yes, IronWord's Reflection class provides various configurable properties to adjust the reflection's appearance, including opacity fade, distance from text, blur settings, and transparency levels. You can fine-tune these attributes to create unique visual effects tailored to your specific design requirements.

What does the default reflection effect look like?

IronWord's default reflection creates a subtle mirror image below the text with automatic opacity fade. The preset configuration includes appropriate blur and transparency settings that work well with various font sizes and styles, making it suitable for most business documents without additional customization.

Why should I use TextStyle objects for reflection effects?

TextStyle objects in IronWord serve as the central configuration point for all text formatting. This separation of style from content allows you to reuse the same reflection effect across multiple text elements, ensuring consistency and making it easy to update effects globally by modifying a single style object.

What types of documents benefit from reflection effects?

Reflection effects work particularly well for headers, titles, and emphasizing key information in professional documents. IronWord's reflection feature simulates text sitting on a glossy surface, creating an elegant appearance that enhances document presentation and draws reader attention to important elements.

Curtis Chau
Technical Writer

Curtis Chau holds a Bachelor’s degree in Computer Science (Carleton University) and specializes in front-end development with expertise in Node.js, TypeScript, JavaScript, and React. Passionate about crafting intuitive and aesthetically pleasing user interfaces, Curtis enjoys working with modern frameworks and creating well-structured, visually appealing manuals.

...

Read More
Ready to Get Started?
Nuget Downloads 28,622 | Version: 2025.12 just released