Inline class

Applies to Windows and Windows Phone

Provides a base class for inline text elements, such as Span and Run.

Inheritance

Object
  DependencyObject
    TextElement
      Inline

Syntax


public class Inline : TextElement

Attributes

[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06020000)]
[WebHostHidden()]

Members

The Inline class has these types of members:

Constructors

The Inline class has these constructors.

ConstructorDescription
Inline Provides base class initialization behavior for Inline derived classes.

 

Methods

The Inline class has these methods. It also inherits methods from the Object class.

MethodDescription
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject)
FindName Retrieves an object in the object model / runtime object graph by referencing the object's x:Name or Name attribute value. (Inherited from TextElement)
GetAnimationBaseValue Returns any base value established for a dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject)
OnDisconnectVisualChildren Override this method to implement how layout and logic should behave when items are removed from a class-specific content or child property. (Inherited from TextElement)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject)

 

Properties

The Inline class has these properties.

PropertyAccess typeDescription

CharacterSpacing

Read/writeGets or sets the uniform spacing between characters, in units of 1/1000 of an em. (Inherited from TextElement)

ContentEnd

Read-onlyGets a TextPointer that represents the end of the content in the element. (Inherited from TextElement)

ContentStart

Read-onlyGets a TextPointer that represents the start of content in the element. (Inherited from TextElement)

Dispatcher

Read-onlyGets the CoreDispatcher that this object is associated with. (Inherited from DependencyObject)

ElementEnd

Read-onlyGets a TextPointer that represents the position just after the end of the element. (Inherited from TextElement)

ElementStart

Read-onlyGets a TextPointer that represents the position just before the start of the element. (Inherited from TextElement)

FontFamily

Read/writeGets or sets the preferred top-level font family for the content of the element. (Inherited from TextElement)

FontSize

Read/writeGets or sets the font size for the content of the element. (Inherited from TextElement)

FontStretch

Read/writeGets or sets the glyph width of the font in a family to select. (Inherited from TextElement)

FontStyle

Read/writeGets or sets the font style for the content in this element. (Inherited from TextElement)

FontWeight

Read/writeGets or sets the top-level font weight to select from the font family for the content in this element. (Inherited from TextElement)

Foreground

Read/writeGets or sets the Brush to apply to the content in this element. (Inherited from TextElement)

IsTextScaleFactorEnabled

Read/writeGets or sets whether automatic text enlargement, to reflect the system text size setting, is enabled. (Inherited from TextElement)

Language

Read/writeGets or sets localization/globalization language information that applies to a TextElement. (Inherited from TextElement)

Name

Read-onlyGets or sets a unique identification for the object. Name can only be set from initial parsing of XAML. (Inherited from TextElement)

 

Remarks

InlineCollection is a strongly typed collection class that is used by various Inlines properties: TextBlock.Inlines, Paragraph.Inlines and Span.Inlines. By specifying XAML object elements within one of these Inlines properties, you can assign multiple Inline elements to be the text content for an inline text container. This is usually done using an implicit collection and XAML property syntax, such that the inline child elements appear as direct children of the container in XAML markup. This example uses all of the common Inline types as content for a Paragraph:


<Paragraph>
  <Bold>Bold</Bold><LineBreak/>
  <Hyperlink>Hyperlink</Hyperlink><LineBreak/>
  <InlineUIContainer>
    <Ellipse Fill="Red" Height="20" Width="20"/>
  </InlineUIContainer><LineBreak/>
  <Italic>Italic</Italic><LineBreak/>
  <Run>Run</Run><LineBreak/>
  <Span>Span</Span><LineBreak/>
  <Underline>Underline</Underline><LineBreak/>
 </Paragraph>

Inline derived classes

Inline is the parent class for several immediately derived classes that further define varieties of inline text for the XAML text object model:

Span has several derived classes too: Bold, Hyperlink, Italic, and Underline. Span can also be used as a formatting element to apply TextElement properties to mixed content (inlines and plain text). Block and Inline are both considered base classes (you don't typically see a <Inline> tag in XAML). For more info on how to use block and inline elements, see Quickstart: Displaying text.

Requirements

Minimum supported client

Windows 8 [Windows Store apps only]

Minimum supported server

Windows Server 2012 [Windows Store apps only]

Minimum supported phone

Windows Phone 8.1 [Windows Runtime apps only]

Namespace

Windows.UI.Xaml.Documents
Windows::UI::Xaml::Documents [C++]

Metadata

Windows.winmd

See also

TextElement
Run
Span
Paragraph.Inlines
TextBlock.Inlines
Quickstart: Displaying text

 

 

Show:
© 2014 Microsoft