Click here to Skip to main content
15,886,564 members
Articles / Desktop Programming / Windows Forms

RichText Builder (StringBuilder for RTF)

Rate me:
Please Sign up or sign in to vote.
4.86/5 (102 votes)
12 Nov 2008CPOL4 min read 247.1K   9.9K   214  
RichText Builder - use in place of StringBuilder to output RTF.



 

namespace RTF
{
    using System;

    [Flags]
    public enum RTFAlignment
    {
        None = 0,

        /// <summary>Content is vertically aligned at the bottom, and horizontally aligned at the center.</summary>
        /// <filterpriority>1</filterpriority>
        BottomCenter = 512,
        /// <summary>Content is vertically aligned at the bottom, and horizontally aligned on the left.</summary>
        /// <filterpriority>1</filterpriority>
        BottomLeft = 256,
        /// <summary>Content is vertically aligned at the bottom, and horizontally aligned on the right.</summary>
        /// <filterpriority>1</filterpriority>
        BottomRight = 1024,
        /// <summary>Content is vertically aligned in the middle, and horizontally aligned at the center.</summary>
        /// <filterpriority>1</filterpriority>
        MiddleCenter = 32,
        /// <summary>Content is vertically aligned in the middle, and horizontally aligned on the left.</summary>
        /// <filterpriority>1</filterpriority>
        MiddleLeft = 16,
        /// <summary>Content is vertically aligned in the middle, and horizontally aligned on the right.</summary>
        /// <filterpriority>1</filterpriority>
        MiddleRight = 64,
        /// <summary>Content is vertically aligned at the top, and horizontally aligned at the center.</summary>
        /// <filterpriority>1</filterpriority>
        TopCenter = 2,
        /// <summary>Content is vertically aligned at the top, and horizontally aligned on the left.</summary>
        /// <filterpriority>1</filterpriority>
        TopLeft = 1,
        /// <summary>Content is vertically aligned at the top, and horizontally aligned on the right.</summary>
        /// <filterpriority>1</filterpriority>
        TopRight = 4
    }
}


By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Australia Australia
Interested in financial math and programming theory in general. Working on medical applications in spare time. Happy to get feedback.

Comments and Discussions