<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://community.devexpress.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Rachel Reese - DevExpress Scheduler &amp; RichEdit Blog</title><link>http://community.devexpress.com/blogs/rachelreese/default.aspx</link><description /><dc:language>en</dc:language><generator>CommunityServer 2007.1 SP1 (Build: 30415.43)</generator><item><title>WinForms RichEdit: Updating the Font</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/10/05/winforms-richedit-updating-the-font.aspx</link><pubDate>Wed, 05 Oct 2011 21:22:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:356271</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=356271</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/10/05/winforms-richedit-updating-the-font.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve had a couple questions lately on how to update paragraph styles after a document has been loaded, or when using our &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/05/13/sneak-peek-winforms-richedit-document-server-coming-soon-in-v2011-volume-1.aspx" target="_blank"&gt;Document Server&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;I&amp;#39;ve discussed before how to &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/08/04/rich-text-editor-changing-the-default-font.aspx" target="_blank"&gt;update the default font&lt;/a&gt; for an empty document, but what if you just want to change the font on a pre-loaded document? Just as easy. If we have the following document: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Original Font, before updating" border="0" alt="Original Font, before updating" src="http://community.devexpress.com/blogs/rachelreese/image_1827426E.png" width="724" height="545" /&gt;&lt;/p&gt;  &lt;p&gt;Then, to update the title and author, we first need to define the range of characters that contains this information: &lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;Document doc = richEditControl1.Document;
DocumentRange range = doc.Paragraphs[1].Range;&lt;/pre&gt;

&lt;p&gt;And then, update the range using the BeginUpdateCharacters and EndUpdateCharacters methods: &lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;CharacterProperties cp = doc.BeginUpdateCharacters(range);
cp.FontName = &amp;quot;French Script MT&amp;quot;;
cp.FontSize = 24;
cp.ForeColor = Color.DarkOliveGreen;
cp.BackColor = Color.BlanchedAlmond;
cp.Underline = UnderlineType.ThickLongDashed;
cp.UnderlineColor = Color.DarkViolet;
doc.EndUpdateCharacters(cp);&lt;/pre&gt;

&lt;p&gt;When we run the project, we see the following:&amp;nbsp; &lt;/p&gt;

&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="With a new font, after updating" border="0" alt="With a new font, after updating" src="http://community.devexpress.com/blogs/rachelreese/image_21A000E4.png" width="730" height="511" /&gt;&lt;/p&gt;

&lt;p&gt;Hope that helps! &lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=356271" width="1" height="1"&gt;</description></item><item><title>Upcoming Webinar: ASP.NET Scheduler 101!</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/26/upcoming-webinar-asp-net-scheduler-101.aspx</link><pubDate>Fri, 26 Aug 2011 17:30:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:352726</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=352726</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/26/upcoming-webinar-asp-net-scheduler-101.aspx#comments</comments><description>&lt;p&gt;Register and attend my &lt;a href="http://www.devexpress.com/Support/Webinars/details.xml?id=ASPxScheduler101"&gt;ASP.NET Scheduler 101&lt;/a&gt; webinar that&amp;#39;ll teach you how to work with the DevExpress ASP.NET Scheduler.&lt;/p&gt;  &lt;p&gt;I&amp;#39;ll cover how to:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Data bind the control;&lt;/li&gt;    &lt;li&gt;Change the theme;&lt;/li&gt;    &lt;li&gt;Customize themes; &lt;/li&gt;    &lt;li&gt;Display multiple time zones; and&lt;/li&gt;    &lt;li&gt;Set the default working hours.&lt;/li&gt; &lt;/ul&gt;  &lt;h5&gt;Register Now&lt;/h5&gt;  &lt;p&gt;Click the &lt;a href="https://www3.gotomeeting.com/register/228808454"&gt;register&lt;/a&gt; button below and &lt;a href="https://www3.gotomeeting.com/register/228808454"&gt;attend the webinar on Monday, August 29th, 2011 at 10AM PST&lt;/a&gt;:&lt;/p&gt;  &lt;h6&gt;Monday, August 29th, 2011 10:00am PDT | 1:00pm EDT | 5:00pm GMT&lt;/h6&gt;  &lt;ul&gt;   &lt;li&gt;Title: &lt;strong&gt;ASP.NET Scheduler 101&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Date: &lt;strong&gt;Monday, August 29th, 2011&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Time: &lt;strong&gt;10am PDT (GMT -07:00)&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Length: &lt;strong&gt;1 hour &lt;/strong&gt;(ish) &lt;/li&gt;    &lt;li&gt;Presenters: &lt;strong&gt;Rachel Reese&lt;/strong&gt;&lt;/li&gt;    &lt;li&gt;Register here - &lt;a title="https://www3.gotomeeting.com/register/228808454" href="https://www3.gotomeeting.com/register/228808454"&gt;https://www3.gotomeeting.com/register/228808454&lt;/a&gt;&lt;/li&gt;    &lt;li&gt;Description:&amp;nbsp;&amp;nbsp; &lt;/li&gt;    &lt;li&gt;Level:&amp;nbsp; 200&lt;/li&gt; &lt;/ul&gt;  &lt;h5&gt;Presenters&lt;/h5&gt;  &lt;p&gt;&lt;img title="antiqued" border="0" alt="antiqued" src="http://community.devexpress.com/blogs/rachelreese/antiqued_4DDAE07F.jpg" width="164" height="164" /&gt;    &lt;br /&gt;&lt;strong&gt;Rachel Reese &lt;/strong&gt;    &lt;br /&gt;Technical Evangelist – Scheduler &amp;amp; RichEdit Team&lt;/p&gt;  &lt;p&gt;&lt;img title="Amanda Christensen" border="0" alt="Amanda Christensen" src="http://community.devexpress.com/blogs/aspnet/AmandaChristensen_324F241C.png" width="168" height="170" /&gt;    &lt;br /&gt;&lt;strong&gt;Amanda Christensen&lt;/strong&gt;    &lt;br /&gt;Host&lt;/p&gt;  &lt;h5&gt;Register Soon&lt;/h5&gt;  &lt;p&gt;What are you waiting for? &lt;a href="https://www3.gotomeeting.com/register/228808454"&gt;Go register, now&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=352726" width="1" height="1"&gt;</description></item><item><title>Rich Text Editor - Table of Contents (available now in v2011, volume 1)</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/25/rich-text-editor-table-of-contents.aspx</link><pubDate>Thu, 25 Aug 2011 16:30:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:342934</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=342934</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/25/rich-text-editor-table-of-contents.aspx#comments</comments><description>&lt;p&gt;You can now automatically add, update, and manage a table of contents from within the RichEdit Control.&amp;#160; You can also import a document from Microsoft Word with a table of contents, and manage it in RichEdit. You can also generate a Table of Figures, or a Table of Equations. This feature is available for all our RichEdit products: WinForms, WPF, Silverlight, and ASP.NET. &lt;/p&gt;  &lt;h3&gt;Why would I add a Table of Contents?&lt;/h3&gt;  &lt;p&gt;Why would you want a Table of Contents? Tables of Contents help your readers quickly understand the content of your document; quickly navigate your document; and more effectively use your document and its content. &lt;/p&gt;  &lt;h3&gt;How do I add a Table of Contents?&lt;/h3&gt;  &lt;p&gt;There are several ways to do this. First, decide whether you would like the table of contents to be built from the heading styles in the document, or from the &lt;a href="http://documentation.devexpress.com/#WPF/CustomDocument9102"&gt;fields&lt;/a&gt; in the document structure. Then, ensure the headings or fields are in place, and finally, generate the table of contents. &lt;/p&gt;  &lt;h4&gt;Using Headings&lt;/h4&gt;  &lt;p&gt;First, you must ensure that all content that you want to appear in the table of contents. There are two ways to do this in the RichEdit control, either by using the references tab, or by using the paragraph dialog box from the Ribbon Control. The main difference in the two is that the levels on the references tab will add a new style to your entry, whereas the paragraph style will leave your text unchanged. &lt;/p&gt;  &lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Using the References tab:&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Click the text that you want to appear in the table of contents. On the References tab, in the Table of Contents group, click Add Text, and then select the desired outline level. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_01A589C6.png" width="621" height="608" /&gt;&amp;#160; &lt;br /&gt;&lt;span style="text-decoration:underline;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;span style="text-decoration:underline;"&gt;Using the Paragraph dialog box: &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;Click the text that you want to appear in the table of contents. Invoke the Paragraph dialog box via the context menu or by clicking the Paragraph Dialog Box Launcher on the Home tab. Then use the Outline level combo box to specify the outline level of the text. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_18B3894C.png" width="692" height="604" /&gt;&amp;#160; &lt;br /&gt;&lt;/p&gt;  &lt;p&gt;Once the information has been labeled, you are ready to create the table of contents. &lt;/p&gt;  &lt;h4&gt;Using Fields&lt;/h4&gt;  &lt;p&gt;If you choose to build your table of contents from the information defined in your &lt;a href="http://documentation.devexpress.com/CoreLibraries/DevExpressXtraRichEditAPINativeSubDocument_Fieldstopic.aspx"&gt;SubDocument.Fields&lt;/a&gt; property, you will have to ensure that your fields are properly defined. On the Mailings tab, click Show All Field Codes, and you&amp;#39;ll see something like the following. Note the {TC &amp;quot;Summary&amp;quot; \f bvz \1 1 } just below the Abstract heading. This adds a field to the Table of Contents at this location in the document which is titled &amp;quot;Summary&amp;quot; with an f switch, and a bvz identifier. BVZ can be anything at all – in this case BVZ are the initials of my coworker, who originally created the document. If you are creating more than one table of contents, all the fields marked with bvz will form one table of contents, just like in Microsoft Word. For more information on fields, see (the Table of Contents article), and the &lt;a href="http://documentation.devexpress.com/#WindowsForms/CustomDocument6584"&gt;list of field codes&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_5C3B9657.png" width="698" height="673" /&gt;&lt;/p&gt;  &lt;p&gt;Using field codes also gives you the ability to declare your figures and equations, for example, and to create a table of figures or table of equations, in addition to your table of contents. The following new switches are available to use with Table of Contents fields: &lt;/p&gt;  &lt;table cellspacing="4" cellpadding="4"&gt;     &lt;tr&gt;       &lt;td&gt;\b&lt;/td&gt;        &lt;td&gt;Includes entries only from the portion of the document marked by the bookmark named by text in this switch&amp;#39;s field-argument.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\h&lt;/td&gt;        &lt;td&gt;Inserts table of contents entries as hyperlinks. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\n&lt;/td&gt;        &lt;td&gt;&amp;quot;LEVELSTART-LEVELEND&amp;quot; Omits page numbers from the table of contents. Page numbers are omitted from all levels unless a range of entry levels is specified. For example, { TOC \n 1-1 } omits page numbers from level 1. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\u&lt;/td&gt;        &lt;td&gt;Uses the applied paragraph outline level, rather than heading style.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\o&lt;/td&gt;        &lt;td&gt;&amp;quot;LEVELSTART-LEVELEND&amp;quot; Builds a table of contents from paragraphs with specified outline levels. For example, { TOC \o &amp;quot;1-3&amp;quot; } lists only paragraphs with outline levels 1 through 3. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\t&lt;/td&gt;        &lt;td&gt;STYLE,LEVEL, STYLE,LEVEL,...&amp;quot; Builds a table of contents from paragraphs formatted with specified styles. For example, {TOC \t&amp;quot;Title,1,subtitle,2,customtitle,3&amp;quot;} builds a table of contents from paragraphs formatted with the styles &amp;quot;Title&amp;quot;, &amp;quot;subtitle&amp;quot; and &amp;quot;customtitle&amp;quot;. The number after each style name indicates the entry level corresponding to that style.&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\c&lt;/td&gt;        &lt;td&gt;&amp;quot;SEQ FIELD IDENTIFIER&amp;quot; Builds a table of contents from items that are numbered by a SEQ field. The sequence identifier designated by text in this switch&amp;#39;s field-argument shall match the identifier in the corresponding SEQ field. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\s&lt;/td&gt;        &lt;td&gt;&amp;quot;SEQ FIELD IDENTIFIER&amp;quot; For entries numbered with a SEQ field, adds a prefix to the page number. The prefix depends on the type of entry. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\d&lt;/td&gt;        &lt;td&gt;&amp;quot;SEPARATOR SYMBOL&amp;quot; When used with \s, defines the separator between sequence and page numbers. The default separator is a hyphen (-).&lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\f&lt;/td&gt;        &lt;td&gt;&amp;quot;TC IDENTIFIER&amp;quot; Builds a table of contents from TC fields. TC field identifier must exactly match the text in this switch&amp;#39;s field-argument. &lt;/td&gt;     &lt;/tr&gt;      &lt;tr&gt;       &lt;td&gt;\l&lt;/td&gt;        &lt;td&gt;&amp;quot;LEVELSTART-LEVELEND&amp;quot;Used with \f key. Includes TC fields that assign entries to one of the specified levels. &lt;/td&gt;     &lt;/tr&gt;   &lt;/table&gt;  &lt;h4&gt;&amp;#160;&lt;/h4&gt;  &lt;h4&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_16514B01.png" width="791" height="653" /&gt;&lt;/h4&gt;  &lt;h4&gt;Creating the Table of Contents&lt;/h4&gt;  &lt;p&gt;Once you&amp;#39;ve labeled all your text, it&amp;#39;s time to add your table of contents! Click where you want to insert the table of contents. Then, on the References tab, in the Table of Contents group, click Table of Contents. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_71749AD9.png" width="420" height="163" /&gt;&lt;/p&gt;  &lt;p&gt;And you&amp;#39;re done! Your table of contents will appear.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_001B2FAF.png" width="791" height="949" /&gt;&lt;/p&gt;  &lt;p&gt;If you have modified the entries in your document, and you need to update the table of contents, it is simple. On the References tab, in the Table of Contents group, click Update Table. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_378557ED.png" width="436" height="169" /&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;h3&gt;How do I add a Table of Contents at runtime? &lt;/h3&gt;  &lt;p&gt;&lt;span style="color:#131313;font-weight:normal;"&gt;We&amp;#39;ve added the following commands in this release: &lt;/span&gt;&lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true; gutter: false; toolbar: false;"&gt;DevExpress.XtraRichEdit.Commands.InsertTableOfContentsCommand 
DevExpress.XtraRichEdit.Commands.UpdateTableOfContentsCommand 
DevExpress.XtraRichEdit.Commands.InsertTableOfEquationsCommand 
DevExpress.XtraRichEdit.Commands.InsertTableOfFiguresCommand 
DevExpress.XtraRichEdit.Commands.InsertTableOfTablesCommand 
DevExpress.XtraRichEdit.Commands.InsertFieldCommand 
DevExpress.XtraRichEdit.Commands.UpdateFieldsCommand &lt;/pre&gt;

&lt;p&gt;&lt;span style="color:#131313;"&gt;For example, if you want to create a table of contents as part of a button&amp;#39;s Click event, simply add the following : &lt;/span&gt;&lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; gutter: false; toolbar: false;"&gt;DevExpress.XtraRichEdit.Commands.InsertTableOfContentsCommand insertTOC = 
	new DevExpress.XtraRichEdit.Commands.InsertTableOfContentsCommand(richEditControl1);
insertTOC.Execute();&lt;/pre&gt;

&lt;p&gt;Adding Table of Contents fields at runtime is the same as adding any other document field. For example, the following will insert a {TOC \h} field at the start of the second paragraph.&amp;#160;&amp;#160; &lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; gutter: false; toolbar: false;"&gt;DevExpress.XtraRichEdit.API.Native.Field _field =
	RichEditControl.Document.Fields.Add(RichEditControl.Document.Paragraphs[1].Range.Start,
	&amp;quot;TOC \\h&amp;quot;);&lt;/pre&gt;

&lt;p&gt;Like so: &lt;/p&gt;

&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_0B2D2AAC.png" width="577" height="400" /&gt;&lt;/p&gt;

&lt;p&gt;For more information, check out our documentation: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://documentation.devexpress.com/#WindowsForms/CustomDocument9561"&gt;http://documentation.devexpress.com/#WindowsForms/CustomDocument9561&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#WPF/CustomDocument9562"&gt;http://documentation.devexpress.com/#WPF/CustomDocument9562&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#Silverlight/CustomDocument5661"&gt;http://documentation.devexpress.com/#Silverlight/CustomDocument5661&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And my recent webinar: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.devexpress.com/Support/Webinars/details.xml?id=XtraRichEditTableContents"&gt;http://www.devexpress.com/Support/Webinars/details.xml?id=XtraRichEditTableContents&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=342934" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/rich+text+editor+table+of+contents/default.aspx">rich text editor table of contents</category></item><item><title>WinForms RichEdit Table of Contents In-Depth Upcoming Webinar!</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/22/winforms-richedit-amp-asp-net-scheduler-upcoming-webinars.aspx</link><pubDate>Tue, 23 Aug 2011 01:11:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:352326</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=352326</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/22/winforms-richedit-amp-asp-net-scheduler-upcoming-webinars.aspx#comments</comments><description>&lt;p&gt;Register and attend my &lt;a href="http://www.devexpress.com/Support/Webinars/details.xml?id=XtraRichEditTableContents"&gt;XtraRichEdit: Table of Contents In-Depth&lt;/a&gt; webinar that&amp;#39;ll teach you how to work with the DevExpress XtraRichEdit Table of Contents. &lt;/p&gt;  &lt;p&gt;I&amp;#39;ll cover:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;How to set up and modify Table of Contents Entries, and the Table of Contents itself from a user perspective and at runtime &lt;/li&gt;    &lt;li&gt;Fields and Switches &lt;/li&gt;    &lt;li&gt;Tables of Figures, Equations, and Tables. &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Register Now&lt;/h3&gt;  &lt;p&gt;Click the &lt;a href="https://www3.gotomeeting.com/register/685619982"&gt;register&lt;/a&gt; button below and &lt;a href="https://www3.gotomeeting.com/register/685619982"&gt;attend the webinar on Wednesday, August 24th, 2011 at 10AM PST&lt;/a&gt;:&lt;/p&gt;  &lt;h4&gt;Friday August 24th, 2011 10:00am PDT | 1:00pm EDT | 5:00pm GMT&lt;/h4&gt;  &lt;ul&gt;   &lt;li&gt;Title: &lt;span style="widows:2;text-transform:none;text-indent:0px;letter-spacing:normal;border-collapse:separate;font:11px verdana, tahoma, arial, helvetica, sans-serif;white-space:normal;orphans:2;word-spacing:0px;-webkit-border-horizontal-spacing:0px;-webkit-border-vertical-spacing:0px;-webkit-text-decorations-in-effect:none;-webkit-text-size-adjust:auto;-webkit-text-stroke-width:0px;" class="Apple-style-span"&gt;&lt;span style="text-align:left;border-collapse:collapse;font-family:verdana;" class="Apple-style-span"&gt;&lt;strong&gt;XtraRichEdit: Table of Contents In-Depth&lt;/strong&gt;&lt;/span&gt;&lt;/span&gt;&amp;nbsp; &lt;/li&gt;    &lt;li&gt;Date: &lt;strong&gt;Friday, August 24th, 2011&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Time: &lt;strong&gt;10am PDT (GMT -07:00)&lt;/strong&gt; &lt;/li&gt;    &lt;li&gt;Length: &lt;strong&gt;1 hour &lt;/strong&gt;(ish) &lt;/li&gt;    &lt;li&gt;Presenters: &lt;strong&gt;Rachel Reese&lt;/strong&gt;&amp;nbsp; &lt;/li&gt;    &lt;li&gt;Register here - &lt;a title="https://www3.gotomeeting.com/register/685619982" href="https://www3.gotomeeting.com/register/685619982"&gt;https://www3.gotomeeting.com/register/685619982&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;Description:&amp;nbsp;&amp;nbsp; &lt;/li&gt;    &lt;li&gt;Level:&amp;nbsp; 200 &lt;/li&gt; &lt;/ul&gt;  &lt;h3&gt;Presenters&lt;/h3&gt;  &lt;p&gt;&amp;nbsp;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="antiqued" border="0" alt="antiqued" src="http://community.devexpress.com/blogs/rachelreese/antiqued_4DDAE07F.jpg" width="164" height="164" /&gt;     &lt;br /&gt;&lt;strong&gt;Rachel Reese &lt;/strong&gt;    &lt;br /&gt;Technical Evangelist – Scheduler &amp;amp; RichEdit Team&lt;/p&gt;  &lt;p&gt;&lt;img title="Amanda Christensen" border="0" alt="Amanda Christensen" src="http://community.devexpress.com/blogs/aspnet/AmandaChristensen_324F241C.png" width="168" height="170" /&gt;     &lt;br /&gt;&lt;strong&gt;Amanda Christensen&lt;/strong&gt;     &lt;br /&gt;Host&lt;/p&gt;  &lt;h3&gt;Register Soon&lt;/h3&gt;  &lt;p&gt;What are you waiting for? &lt;a href="https://www3.gotomeeting.com/register/685619982"&gt;Go register, now&lt;/a&gt;.&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=352326" width="1" height="1"&gt;</description></item><item><title>Rich Text Editor: Changing the Default Font</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/04/rich-text-editor-changing-the-default-font.aspx</link><pubDate>Thu, 04 Aug 2011 23:48:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:351092</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>1</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=351092</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/04/rich-text-editor-changing-the-default-font.aspx#comments</comments><description>&lt;p&gt;I was chatting with a customer this afternoon who was having trouble setting the default font on his XtraRichEdit. Sure, changing it at runtime using the Font drop down on the Ribbon bar works completely fabulously ;) but he wanted his users to start just typing away in Century Gothic. &lt;/p&gt;  &lt;p&gt;Easy peasy, says I: we have a property for that. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_1DE84563.png" width="447" height="412" /&gt;&lt;/p&gt;  &lt;p&gt;This is also accomplishable via code: &lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;richEditControl1.Document.DefaultCharacterProperties.FontSize = 12;
richEditControl1.Document.DefaultCharacterProperties.FontName = &amp;quot;Century Gothic&amp;quot;;&lt;/pre&gt;



&lt;p&gt;For more information, check out the &lt;a href="http://documentation.devexpress.com/#WindowsForms/CustomDocument5813" target="_blank"&gt;documentation&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;Hope this helps! &lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=351092" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/WinForms/default.aspx">WinForms</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/RichEdit/default.aspx">RichEdit</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/XtraRichEdit/default.aspx">XtraRichEdit</category></item><item><title>ASP.NET Scheduler: Getting Started - Binding to a Data Source</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/03/aspxscheduler-getting-started-binding-to-a-data-source.aspx</link><pubDate>Wed, 03 Aug 2011 16:59:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:350632</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=350632</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/08/03/aspxscheduler-getting-started-binding-to-a-data-source.aspx#comments</comments><description>&lt;p&gt;Since I&amp;#39;m just as new to our Scheduler control as some of you, I thought I&amp;#39;d start with a series of posts showing you just how easy it is to do some of the basics! I&amp;#39;ve gotten several questions already on how to bind the data to the ASP.NET Scheduler control, so we&amp;#39;ll start here! :)&lt;/p&gt;  &lt;p&gt;First, if you need to create your database to work with our Scheduler, you will need the scripts from &lt;a href="http://documentation.devexpress.com/#AspNet/CustomDocument3798" target="_blank"&gt;this article&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;We&amp;#39;ll begin with a brand new ASP.NET application, and just drag the ASPxScheduler from the toolbox: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_01D215E4.png" width="226" height="180" /&gt;&lt;/p&gt;  &lt;p&gt;into the MainContent section, then click the arrow on the upper right corner of the ASP.NET Scheduler: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_3A108CFC.png" width="640" height="275" /&gt;&lt;/p&gt;  &lt;p&gt;and you&amp;#39;ll see the ASPxScheduler Tasks menu. We&amp;#39;ll need to set the data source for both appointments and resources (what it is what we&amp;#39;re scheduling: people, rooms, equipment, etc.). So, click the data source menu, and choose &amp;quot;&amp;lt;New Data Source&amp;gt;.&amp;quot; &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_724F0414.png" width="721" height="517" /&gt;&lt;/p&gt;  &lt;p&gt;This will pop up the Data Source Configuration Wizard: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_24D26187.png" width="772" height="580" /&gt;&lt;/p&gt;  &lt;p&gt;I&amp;#39;m going to use a SQL Server Compact file, so I click SQL Server, enter a name for the data source, and click OK. Next, I need to create the connection string. So, I click New Connection: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_7445D7BD.png" width="773" height="624" /&gt;&lt;/p&gt;  &lt;p&gt;Then, enter the path to the file, and click OK: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_3688CA34.png" width="413" height="549" /&gt;&lt;/p&gt;  &lt;p&gt;Save the connection string to the application, and click Next: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_0B80B662.png" width="773" height="624" /&gt;Specify the columns that you will need for your appointments, then click Advanced:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_0DC3E04B.png" width="773" height="624" /&gt;&lt;/p&gt;  &lt;p&gt;and check &amp;quot;Generate INSERT, UPDATE, and DELETE statements,&amp;quot; then click OK. &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_65B1312B.png" width="545" height="356" /&gt;&lt;/p&gt;  &lt;p&gt;And click Next, and then Finish. Next, the Mappings Wizard will pop up, and let you verify that the columns that the Scheduler requires are mapped to the columns in your database properly. Required fields are ID, Start, and End. Verify these, and click Next: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_44BDBE84.png" width="535" height="420" /&gt;&lt;/p&gt;  &lt;p&gt;Now, you can set the Custom Fields. Choose the additional fields you&amp;#39;d like to include, move them to the right column and, finally, click Finish:&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_5C6E54BD.png" width="535" height="420" /&gt;&lt;/p&gt;  &lt;p&gt;Once that is done, reopen the Tasks menu on the ASPxScheduler, and repeat for the resource data source. If you need to modify the data source at any time, there is an available Tasks menu with a &amp;quot;Configure Data Source…&amp;quot; option which will bring back up the Data Source Configuration Wizard: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_63CA146A.png" width="475" height="208" /&gt;&lt;/p&gt;  &lt;p&gt;One final step to be able to post data back into the database. We need to determine (using SELECT @@IDENTITY), and then assign, the correctly calculated ID value in the INSERT statement. To do this, highlight the data source, then click the InsertQuery property: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_2B786265.png" width="367" height="269" /&gt;&lt;/p&gt;  &lt;p&gt;to invoke the Command and Parameter Editor: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_1C61838B.png" width="732" height="559" /&gt;&lt;/p&gt;  &lt;p&gt;Now, remove the ID parameter from the INSERT statement text and the parameter list. To generate the correct ID, we&amp;#39;ll need to handle a couple events, like so: &lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;int lastInsertedAppointmentId;

protected void ASPxScheduler1_AppointmentRowInserting(object sender,
ASPxSchedulerDataInsertingEventArgs e)
{
    // Remove unnecessary ID field. 
    e.NewValues.Remove(&amp;quot;ID&amp;quot;);
}

protected void appointmentDataSource_Inserted(object sender,
SqlDataSourceStatusEventArgs e)
{
    // Obtain the identity value. 
    SqlConnection connection = (SqlConnection)e.Command.Connection;
    using (SqlCommand cmd = new SqlCommand(&amp;quot;SELECT @@IDENTITY&amp;quot;, connection))
    {
        lastInsertedAppointmentId = (int)cmd.ExecuteScalar();
    }
}

protected void ASPxScheduler1_AppointmentRowInserted(object sender,
ASPxSchedulerDataInsertedEventArgs e)
{
    // Specify new ID field value. 
    e.KeyFieldValue = lastInsertedAppointmentId;
}

protected void ASPxScheduler1_OnAppointmentsInserted(object sender,
PersistentObjectsEventArgs e)
{
    // Store the new appointment. 
    int count = e.Objects.Count;
    System.Diagnostics.Debug.Assert(count == 1);
    Appointment apt = (Appointment)e.Objects[0];
    ASPxSchedulerStorage storage = (ASPxSchedulerStorage)sender;
    storage.SetAppointmentId(apt, lastInsertedAppointmentId);
}&lt;/pre&gt;

&lt;p&gt;For more information, see Step 13-14 in &lt;a href="http://documentation.devexpress.com/#AspNet/CustomDocument3844" target="_blank"&gt;How to: Bind an ASPxScheduler to Data at Design Time&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;And when we run the project, we&amp;#39;re good to go!&amp;nbsp; &lt;/p&gt;

&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_78C35E58.png" width="821" height="689" /&gt;&lt;/p&gt;

&lt;p&gt;Hope this helps! &lt;/p&gt;

&lt;p&gt;For other data sources and additional examples:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.devexpress.com/Support/Center/p/E215.aspx"&gt;How to bind ASPxScheduler to SQL Server database&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.devexpress.com/Support/Center/p/K18043.aspx"&gt;How to bind ASPxScheduler to ObjectDataSource&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.devexpress.com/Support/Center/p/E409.aspx"&gt;How to bind ASPxScheduler to SyBase ASE 15 database&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.devexpress.com/Support/Center/e/E1888.aspx"&gt;How to bind ASPxScheduler to LINQ Data Source&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.devexpress.com/Support/Center/p/E1450.aspx"&gt;How to bind ASPxScheduler with multi-resource appointments to SQL Server database&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.devexpress.com/Support/Center/p/E261.aspx"&gt;How to bind ASPxScheduler to XPO via the Unit of Work&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For additional documentation: &lt;/p&gt;

&lt;p&gt;&lt;a href="http://documentation.devexpress.com/#AspNet/CustomDocument3685"&gt;http://documentation.devexpress.com/#AspNet/CustomDocument3685&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://documentation.devexpress.com/#AspNet/CustomDocument3844"&gt;http://documentation.devexpress.com/#AspNet/CustomDocument3844&lt;/a&gt;&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=350632" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/Scheduler/default.aspx">Scheduler</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/ASP.NET/default.aspx">ASP.NET</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/ASPxScheduler/default.aspx">ASPxScheduler</category></item><item><title>WinForms Rich Editor: New Feature Videos!</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/07/18/winforms-rich-editor-new-feature-videos.aspx</link><pubDate>Mon, 18 Jul 2011 18:12:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:349931</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=349931</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/07/18/winforms-rich-editor-new-feature-videos.aspx#comments</comments><description>&lt;p&gt;We&amp;#39;ve been busy here at DevExpress – cracking out new videos on all our new version 2011, volume 1 features! &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;float:left;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" align="left" src="http://community.devexpress.com/blogs/rachelreese/image_6D2397D1.png" width="360" height="217" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Table of Contents &lt;/strong&gt;&lt;a href="http://tv.devexpress.com/#XtraRichEditTableOfContents;XtraRichEdit.product;1" target="_blank"&gt;video&lt;/a&gt; – &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/05/11/winforms-richedit-table-of-contents-coming-soon-in-v2011-volume-1-sneak-peek.aspx" target="_blank"&gt;blog&lt;/a&gt;    &lt;br /&gt;The WinForms Rich Text Editor now supports Table of Contents features. You may load a document from Word with a pre-existing Table of Contents, or we&amp;#39;ve enabled you to set up your own table of contents using new field types. &lt;/p&gt; &lt;strong&gt;Document Server&lt;/strong&gt; &lt;a href="http://tv.devexpress.com/#XtraRichEditDocConverterServer"&gt;video&lt;/a&gt;&lt;strong&gt;&lt;/strong&gt; – &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/05/13/sneak-peek-winforms-richedit-document-server-coming-soon-in-v2011-volume-1.aspx" target="_blank"&gt;blog&lt;/a&gt;  &lt;br /&gt;Our XtraRichEdit Suite exposes a server-side non-visual equivalent of our text editor, which can be used to automate common tasks. It&amp;#39;s possible to convert files, as well as load, save, and modify documents. It’s also possible to add tables; update sections; reformat the text or the paragraphs; add/change permissions or protection on the document; or even perform a mail-merge.   &lt;p&gt;&lt;strong&gt;Support for Microsoft Word 1997-2003 .doc Format &lt;/strong&gt;&lt;a href="http://tv.devexpress.com/#XtraRichEditDocFormat;XtraRichEdit.product;1" target="_blank"&gt;video&lt;/a&gt; – &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/05/16/sneak-peek-winforms-richedit-support-for-doc-format-coming-soon-in-2011-volume-1.aspx" target="_blank"&gt;blog&lt;/a&gt;    &lt;br /&gt;We now support .doc format files. It&amp;#39;s possible to load, save, convert to and from DOC format.&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;float:right;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" align="right" src="http://community.devexpress.com/blogs/rachelreese/image_409A67EB.png" width="287" height="165" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Progress Bar and Mail Merge Events &lt;/strong&gt;&lt;a href="http://tv.devexpress.com/#XtraRichEditMailMerge;XtraRichEdit.product;1" target="_blank"&gt;video&lt;/a&gt; – &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/06/02/sneak-peek-richedit-mail-merge-improvements-coming-soon-in-v2011-volume-1.aspx" target="_blank"&gt;merge events blog&lt;/a&gt;, &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/06/02/sneak-peek-richedit-progress-bar-coming-soon-in-v2011-volume-1.aspx" target="_blank"&gt;progress bar blog&lt;/a&gt;    &lt;br /&gt;We&amp;#39;ve added new mail merge events and a progress service, to enable you to include a progress bar in your project.&lt;strong&gt;&amp;nbsp;&lt;/strong&gt;&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;New Page Setup Dialog &lt;/strong&gt;&lt;a href="http://tv.devexpress.com/#XtraRichEditPageDialog;XtraRichEdit.product;1" target="_blank"&gt;video&lt;/a&gt; – &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/06/03/sneak-peek-richedit-new-page-setup-dialog-coming-soon-in-v2011-volume-1.aspx" target="_blank"&gt;blog&lt;/a&gt;     &lt;br /&gt;XtraRichEdit now offers a page setup dialog. It&amp;#39;s now even easier to configure margins, orientation, columns, and paper size for your document, or a section of your document.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Paste Special&lt;/strong&gt;&amp;nbsp;&lt;a href="http://tv.devexpress.com/#XtraRichEditPasteSpecial;XtraRichEdit.product;1" target="_blank"&gt;video&lt;/a&gt; – &lt;a href="http://community.devexpress.com/blogs/rachelreese/archive/2011/05/27/sneak-peek-winforms-richedit-paste-special-coming-soon-in-v2011-volume-1.aspx" target="_blank"&gt;blog&lt;/a&gt;    &lt;br /&gt;Now added to our clipboard menu! Now you are able to paste unformatted text right from the clipboard! It&amp;#39;s also possible to paste in RTF and HTML. &lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=349931" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/WinForms/default.aspx">WinForms</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/RichEdit/default.aspx">RichEdit</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/v2011.1/default.aspx">v2011.1</category></item><item><title>WinForms XtraRichEdit – A History of Undo and Redo</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/07/14/winforms-xtrarichedit-undo-redo-an-illusion-of-simplicity.aspx</link><pubDate>Thu, 14 Jul 2011 17:34:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:341965</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>0</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=341965</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/07/14/winforms-xtrarichedit-undo-redo-an-illusion-of-simplicity.aspx#comments</comments><description>&lt;p&gt;I&amp;#39;ve been learning a little about the history of the XtraRichEdit control this week, and I wanted to share a development story with you all. :-)&lt;/p&gt;  &lt;p&gt;Undo and redo are such simple and familiar features in any text and graphics editor that you&amp;#39;d think they&amp;#39;d be easy to implement. We thought so, too, when we first set out to develop the feature for our XtraRichEdit control. So, what&amp;#39;s the approach we took? &lt;/p&gt;  &lt;p&gt;&lt;img alt="" src="http://habrastorage.org/storage/48b7ada0/91879e1d/2693117d/58e72cb0.png" /&gt;&lt;/p&gt;  &lt;p&gt;Well, first, it&amp;#39;s obvious that there needs to be an object that holds a history of the changes. It should contain a list of the actions, with enough information to undo or redo each action. Since actions can be very different (inserting text, changing fonts) we decided right away that our object should not only hold all the data necessary to undo and redo, but actually be responsible for implementing them: &lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;public abstract class HistoryItem {
    public abstract void Undo (Document document);
    public abstract void Redo (Document document);
}&lt;/pre&gt;

&lt;p&gt;Our first basic prototype of the code looked like this: &lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;public class History {
    ReadOnly &amp;lt;HistoryItem&amp;gt; List items = new List &amp;lt;HistoryItem&amp;gt; ();

    public History (Document document) {
        this.document = document;}

    public void Undo() {}
    public void Redo() {}
    public void Add(HistoryItem item) {items.Add (item);}
}&lt;/pre&gt;

&lt;p&gt;Diving in first to the Undo method: &lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;public void Undo () {
	items[items.Count - 1 ].Undo(document);
}&lt;/pre&gt;

&lt;p&gt;Looks good, right? Succinct and elegant… and wrong. For starters, when you call the Undo method for an empty list, we get an exception. So we fix that:&lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;public bool CanUndo { get { return items.Count &amp;gt; 0 ;}}
public void Undo() {
	if (!CanUndo) return ; 
	items[items.Count - 1 ].Undo(document);
}&lt;/pre&gt;

&lt;p&gt;Now, the issue is that if we call the Undo method several times in a row, it&amp;#39;ll repeatedly try to Undo the last item in the list. So we remove the most recent item, and we&amp;#39;re good to go: &lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;public void Undo () {
	if (!CanUndo) return ;
	items[items.Count - 1 ].Undo(document);
	items.RemoveAt(items.Count - 1 );
}&lt;/pre&gt;

&lt;p&gt;So, let&amp;#39;s consider Redo:&lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;public void Redo () {
    if (!CanRedo) return ;
    // ???
}&lt;/pre&gt;

&lt;p&gt;Oops! Our implementation of Undo means that we&amp;#39;ve lost the change we now need to redo. Instead, we need an index indicating the current item in the clipboard. So, we rewrite again:&lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;int currentIndex = -1 ;
public bool CanUndo { get { return currentIndex&amp;gt; = 0 ;}}
public bool CanRedo { get { return items.Count&amp;gt; 0 &amp;amp;&amp;amp; currentIndex &amp;lt; items.Count - 1 ;}}

public void Undo() {
    if (!CanUndo) return; 
    items[currentIndex].Undo(document);
    this.currentIndex--;
}

public void Redo() {
    if (!CanRedo) return ;
    this.currentIndex++; 
    items[currentIndex].Redo(document); 
}

public void Add (HistoryItem item) {items.Add (item);
    this.currentIndex++;}&lt;/pre&gt;

&lt;p&gt;That&amp;#39;s much better. Note that now, for an Undo, the index changes *after* the rollback; and for a Redo, it changes *before* the roll forward. We also correctly increment the index when we add an item in the history. &lt;/p&gt;

&lt;p&gt;Now, let&amp;#39;s take a closer look at the Add method. What if we perform 5 actions, roll back 3 of them, and then perform a new action? Looking around, we determine that the Undo/Redo standard here is to drop everything that has happened after the current index, and to instead begin a new history. &lt;/p&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;Public void Add (HistoryItem item) {
    CutOffHistory(); 
    items.Add(item);
    this.currentIndex++;
}

void CutOffHistory() {
    int index = currentIndex + 1 ;
    if (index &amp;lt; Count) 
        items.RemoveRange(index, Count - index);
}&lt;/pre&gt;

&lt;p&gt;Now, we have our Undo/Redo implementation. The original intention was: &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Perform an action; &lt;/li&gt;

  &lt;li&gt;Record said action into the history, so that we&amp;#39;re able to undo/redo later; &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, we decided we wanted our undo history not only to store what was undone, but actually to be able to redo the operation independently. In other words: &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;Create an undo element, and add it to the history for potential undoing and redoing later; &lt;/li&gt;

  &lt;li&gt;Perform redo for the history item, like so: &lt;/li&gt;
&lt;/ol&gt;

&lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;	void DoAction() {
	    HistoryItem item = CreateActionHistoryItem();
	    document.History.Add(item);
	    item.Redo(document);
	}&lt;/pre&gt;

&lt;p&gt;This works fabulously. We can redo an action from the current state, or undo an action from the current state, and it is possible to step through the history in either direction to affect the current state. By &amp;quot;state&amp;quot;. I mean that the information recorded in the history is correct when it&amp;#39;s saved, but it may change a moment later. For example, if we have &amp;quot;Hello World!&amp;quot;: &lt;/p&gt;

&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="undo1" border="0" alt="undo1" src="http://community.devexpress.com/blogs/rachelreese/undo1_4E7EC353.png" width="303" height="38" /&gt;&lt;/p&gt;

&lt;p&gt;Now, let&amp;#39;s insert DevExpress in the middle; which means we record &amp;quot;insert DevExpress at position 6&amp;quot; into the history: &lt;/p&gt;

&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="undo2" border="0" alt="undo2" src="http://community.devexpress.com/blogs/rachelreese/undo2_74E0A69E.png" width="672" height="38" /&gt;&lt;/p&gt;

&lt;p&gt;Next, we&amp;#39;ll insert &amp;quot;We say:&amp;quot; at the beginning: &lt;/p&gt;

&lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="undo3" border="0" alt="undo3" src="http://community.devexpress.com/blogs/rachelreese/undo3_787EC17B.png" width="730" height="38" /&gt;&lt;/p&gt;

&lt;p&gt;But, now our previous information about inserting DevExpress is incorrect. If we call undo at this point in the history, we&amp;#39;d invalidate the document. We have to recalculate the index to get the correct undo information. However, it&amp;#39;s not necessary to recalculate. We can avoid it, by assuming that cancelling every operation before the relevant one leads the document to the state that it had at the beginning of the operation. We&amp;#39;d make the same assumption for redo, also. The information in the undo history will automatically become correct when the document arrives at the initial state (where the information was saved). As the redo operation occurs in the reverse order, we cannot use the information before the document is presented in the necessary state. Thus, we automatically handle the undo and redo correctly. &lt;/p&gt;

&lt;p&gt;These were just our initial observations here at DevExpress. In the real world, things might be a little different. ;)&lt;/p&gt;

&lt;p&gt;As a side note: While writing this, I wondered who first implemented undo and redo (and when). Apparently, it was between 1971 and 1976. Modern &lt;a href="http://man.cat-v.org/unix_8th/1/ed"&gt;manuals&lt;/a&gt; of &lt;a href="http://en.wikipedia.org/wiki/Ed_%28text_editor%29"&gt;ed&lt;/a&gt; argue that it supports undo; the &lt;a href="http://man.cat-v.org/unix-1st/1/ed"&gt;first manuals&lt;/a&gt; for UNIX (1971) do not include undo; but &lt;a href="http://en.wikipedia.org/wiki/Vi"&gt;vi&lt;/a&gt; (first published 1976) contains it from the start. The term itself was first mentioned in 1976: &amp;quot;It would be quite useful, to permit users to ‘take back’ at least the immediately preceding command (by issuing some special ‘undo’ command).” (Lance A. Miller and John C. Thomas of I.B.M., “Behavioral Issues in the Use of Interactive Systems.”) See &lt;a href="http://www.nytimes.com/2009/09/20/magazine/20FOB-onlanguage-t.htm"&gt;related article&lt;/a&gt; in the NY Times. &lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=341965" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/RichEdit/default.aspx">RichEdit</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/XtraRichEdit/default.aspx">XtraRichEdit</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/history/default.aspx">history</category></item><item><title>MADExpo</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/07/07/madexpo.aspx</link><pubDate>Thu, 07 Jul 2011 20:57:58 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:349137</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>2</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=349137</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/07/07/madexpo.aspx#comments</comments><description>&lt;p&gt;Take a look at some pictures from my recent trip down to &lt;a href="http://madexpo.us/"&gt;MADExpo&lt;/a&gt; in Hampton, VA last week: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Me at the DevEx booth, chatting to Kendall Miller" border="0" alt="Me at the DevEx booth, chatting to Kendall Miller" src="http://community.devexpress.com/blogs/rachelreese/IMAG0521_5FA520F3.jpg" width="640" height="383" /&gt;&lt;/p&gt;  &lt;p&gt;Sitting with (half of) Kendall Miller, chatting about DX. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="Rachel Appel, Chris Love, Rachel Reese" border="0" alt="Rachel Appel, Chris Love, Rachel Reese" src="http://community.devexpress.com/blogs/rachelreese/1309441052110_5E608814.jpg" width="640" height="383" /&gt;&lt;/p&gt;  &lt;p&gt;Rachel Appel, Chris Love, and me. If only Rachel Hawley could have been there, we&amp;#39;d have had a trio of Rachii! ;)&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="G. Andrew Duthie controls a robot with his mind" border="0" alt="Duthie controls a robot with his mind" src="http://community.devexpress.com/blogs/rachelreese/photo_5D1BEF35.jpg" width="640" height="478" /&gt;&lt;/p&gt;  &lt;p&gt;And, G. Andrew Duthie taking time away from the HTML 5 Camp to power robots with his brain. &lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;This was the first year for this conference, and was a great start! In addition to the several (really great) session tracks, they had an HTML5 Camp alongside, a hardware hackerspace (with robots!! Check out: &lt;a href="http://www.youtube.com/watch?v=UV-J_hy9XDA"&gt;http://www.youtube.com/watch?v=UV-J_hy9XDA&lt;/a&gt;) and a separate room for kids to play with coding, robotics, electronics. DevExpress was there both days, and it was great to chat to everyone who came over to say hi, or show their support for us. All-in-all, it was a great time. Hope to see you all there next year! &lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=349137" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/MADExpo/default.aspx">MADExpo</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/conference/default.aspx">conference</category></item><item><title>WinForms Rich Text Editor – New Page Setup Dialog! (available now in v2011, volume 1)</title><link>http://community.devexpress.com/blogs/rachelreese/archive/2011/06/03/sneak-peek-richedit-new-page-setup-dialog-coming-soon-in-v2011-volume-1.aspx</link><pubDate>Fri, 03 Jun 2011 16:21:00 GMT</pubDate><guid isPermaLink="false">bd716303-653c-428d-8b8a-a7d998cde032:345993</guid><dc:creator>Rachel Reese (DevExpress)</dc:creator><slash:comments>6</slash:comments><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://community.devexpress.com/blogs/rachelreese/rsscomments.aspx?PostID=345993</wfw:commentRss><comments>http://community.devexpress.com/blogs/rachelreese/archive/2011/06/03/sneak-peek-richedit-new-page-setup-dialog-coming-soon-in-v2011-volume-1.aspx#comments</comments><description>&lt;p&gt;We&amp;#39;ve introduced a whole new page setup dialog for you in 2011, volume 1! To get there, click the button on the bottom of the Page Setup section: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_163D1EE9.png" width="494" height="165" /&gt;&lt;/p&gt;  &lt;p&gt;which will give you: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_7549AC41.png" width="421" height="416" /&gt;&lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_5E74AA9B.png" width="421" height="416" /&gt;&lt;/p&gt;  &lt;p&gt;and &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-bottom:0px;border-left:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top:0px;border-right:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_630AB555.png" width="421" height="416" /&gt;&lt;/p&gt;  &lt;p&gt;You can configure a huge list of things! Margins, orientation, paper size, which can be configured for the whole document, or by section, as well as options for sections, headers, and footers of your document. &lt;/p&gt;  &lt;p&gt;There&amp;#39;s also a new columns dialog, reachable by clicking the &amp;quot;more columns&amp;quot; option under &amp;quot;Columns&amp;quot; in the Page Setup section: &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_62287F95.png" width="461" height="424" /&gt;&lt;/p&gt;  &lt;p&gt;Again, columns can be configured by section, or for the whole document. &lt;/p&gt;  &lt;p&gt;We also now support line-numbering documents from the UI! Simply choose from the line numbers drop down, and voila! &lt;/p&gt;  &lt;p&gt;&lt;img style="background-image:none;border-right-width:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;padding-top:0px;" title="image" border="0" alt="image" src="http://community.devexpress.com/blogs/rachelreese/image_7725E9A7.png" width="763" height="782" /&gt;&lt;/p&gt;  &lt;p&gt;All of these features are still available at run time, too, from the &lt;a href="http://documentation.devexpress.com/CoreLibraries/DevExpressXtraRichEditAPINative.aspx"&gt;DevExpress.XtraRichEdit.API.Native&lt;/a&gt; namespace. For example, to set up three columns (like &lt;a href="http://documentation.devexpress.com/#WindowsForms/CustomDocument6013"&gt;our example&lt;/a&gt;):&amp;nbsp; &lt;/p&gt;  &lt;pre class="brush: csharp; ruler: true; toolbar: false;"&gt;// Specify a measurement unit
richEditControl1.Document.Unit = DocumentUnit.Inch;
// Get the first section in a document
Section sectionDoc = richEditControl1.Document.Sections[0];
// Create columns and apply them to the document
SectionColumnCollection sectionColumnsLayout = 
    sectionDoc.Columns.CreateUniformColumns(sectionDoc.Page, 0.2f, 3);
sectionDoc.Columns.SetColumns(sectionColumnsLayout);&lt;/pre&gt;

&lt;p&gt;Check out the full list of supported properties: &lt;/p&gt;

&lt;p&gt;Page Setup: 
  &lt;br /&gt;ShowPageSetupFormCommand 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeSection_Marginstopic"&gt;Section.Margins&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FclsDevExpressXtraRichEditAPINativeSectionMarginstopic"&gt;SectionMargins&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSection_Pagetopic"&gt;Section.Page&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FclsDevExpressXtraRichEditAPINativeSectionPagetopic"&gt;SectionPage&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSectionPage_Landscapetopic"&gt;SectionPage&lt;/a&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSectionPage_Landscapetopic"&gt;.Landscape&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSectionPage_PaperKindtopic"&gt;SectionPage.PaperKind&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSectionPage_Widthtopic"&gt;SectionPage.Width&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSectionPage_Heighttopic"&gt;SectionPage&lt;/a&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSectionPage_Heighttopic"&gt;.Height&lt;/a&gt; 

  &lt;br /&gt;Section.StartType 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeDocument_DifferentOddAndEvenPagestopic"&gt;Document.DifferentOddAndEvenPages&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeSection_DifferentFirstPagetopic"&gt;Section.DifferentFirstPage&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Columns Setup: 
  &lt;br /&gt;ShowColumnsSetupFormCommand 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSection_Columnstopic"&gt;Section.Columns&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FclsDevExpressXtraRichEditAPINativeSectionColumnstopic"&gt;SectionColumns&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FclsDevExpressXtraRichEditAPINativeSectionColumntopic"&gt;SectionColumn&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Line Numbering: 
  &lt;br /&gt;ShowLineNumberingFormCommand 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23CoreLibraries%2FDevExpressXtraRichEditAPINativeSection_LineNumberingtopic"&gt;Section.LineNumbering&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FclsDevExpressXtraRichEditAPINativeSectionLineNumberingtopic"&gt;SectionLineNumbering&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeSectionLineNumbering_Starttopic"&gt;SectionLineNumbering.Start&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeSectionLineNumbering_CountBytopic"&gt;SectionLineNumbering.CountBy&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeSectionLineNumbering_Distancetopic"&gt;SectionLineNumbering.Distance&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23Silverlight%2FDevExpressXtraRichEditAPINativeSectionLineNumbering_RestartTypetopic"&gt;SectionLineNumbering.RestartType&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more information, see the following samples: 
  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23WindowsForms%2FCustomDocument5814"&gt;How to: Configure the Page Layout Programmatically&lt;/a&gt; 

  &lt;br /&gt;&lt;a href="http://www.google.com/url?sa=D&amp;amp;q=http%3A%2F%2Fdocumentation.devexpress.com%2F%23WindowsForms%2FCustomDocument6013"&gt;How to: Create a Three-Column Layout with Uniform Columns &lt;/a&gt;

  &lt;br /&gt;Demo Module: Line Numbering&lt;/p&gt;&lt;img src="http://community.devexpress.com/aggbug.aspx?PostID=345993" width="1" height="1"&gt;</description><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/RichEdit/default.aspx">RichEdit</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/XtraRichEdit/default.aspx">XtraRichEdit</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/pagesetup/default.aspx">pagesetup</category><category domain="http://community.devexpress.com/blogs/rachelreese/archive/tags/dialogs/default.aspx">dialogs</category></item></channel></rss>