Intersoft ClientUI Documentation
Run Class
Members 



An inline-level flow content element intended to contain a run of formatted or unformatted text.
Syntax
<ContentPropertyAttribute("Text")>
Public Class Run 
   Inherits Inline
Dim instance As Run
[ContentPropertyAttribute("Text")]
public class Run : Inline 
[ContentPropertyAttribute("Text")]
public ref class Run : public Inline 
Remarks

Run is used to contain unformatted text. You might expect Run objects to be used extensively in flow content. However, in markup, Run elements are not required to be used explicitly. For example, in the markup below, the first Paragraph specifies the Run element explicitly while the second does not. Both paragraphs generate identical output.

XAML
Copy Code
<Intersoft:FlowDocument>
    <Intersoft:Paragraph>
        <Intersoft:Run>
            Paragraph that explicitly uses the Run element.
        </Intersoft:Run>
    </Intersoft:Paragraph>
    <Intersoft:Paragraph>
        This Paragraph omits the the Run element in markup. It renders the same as a Paragraph with Run used explicitly.
    </Intersoft:Paragraph>
</Intersoft:FlowDocument>

Despite the flexibility on whether or not to use Run element, you cannot combine implicit and explicit markup in a single Block element. Implicit markup is recommended if you only use text content in a Block element. Explicit markup is recommended if you need to use multiple Inline elements in a Block element.

By default, Silverlight will trim the space in front and end of the inline content. If you have multiple Inline elements and specify the content as inline content, the space at the beginning and ending of the content will be removed. This could cause the sentences to be combined without space. In this case, it is recommended that you use Text property to specify the content. If there are long words that does not fit in the available space, the word will be splitted and continued to the next line.

XAML
Copy Code
<Intersoft:FlowDocument>
    <Intersoft:Paragraph>
        <Intersoft:Run Text="Lorem ipsum dolor sit amet, "/>
        <Intersoft:Italic>
            <Intersoft:Run Text="consectetur adipisicing elit, "/>
        </Intersoft:Italic>
        <Intersoft:Run Text="sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."/>
    </Intersoft:Paragraph>
</Intersoft:FlowDocument>

Note that when FlowDocument is in page mode and the textual content is rendered in the page intersection, the whole line will be shifted to the next page.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      Intersoft.Client.Documents.TextElement
         Intersoft.Client.Documents.Inline
            Intersoft.Client.Documents.Run

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

Run Members
Intersoft.Client.Documents Namespace

Send Feedback