Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{description}
{excerpt}Sets or returns a {{boolean}} representing if Word will use Widow Control for a paragraph. When set to true, Word will not print the last line of a paragraph by itself at the top of a page \(widow\) or the first line of a paragraph by itself at the bottom of a page \(orphan\).{excerpt}
{signature:C#}
 public boolean WidowControl{ get; set; }
{signature}{signature:vb.net}
Public Property WidowControl() As Boolean
{signature}
{remarks}The default value for a new paragraph is {{true}}.

MS Word equivalent: Format menu > Paragraph... > Line and Page Breaks tab > Pagination section > Widow/Orphan control

{remarks}
{example}{code:csharp|title=C#}

          //--- Return WidowControl
          bool widowControl = oParagraphFormatting.WidowControl;

          //--- Set WidowControl
          oParagraphFormatting.WidowControl = false;
        {code}
{code:vb.net|title=vb.net}

          '--- Return WidowControl
          Dim widowControl As Boolean = oParagraphFormatting.WidowControl

          '--- Set WidowControl
          oParagraphFormatting.WidowControl = False
        {code}

{example}