Block Block Block Block Class
An abstract class that provides a base for all block-level content elements.
public : class Block : TextElement
struct winrt::Windows::UI::Xaml::Documents::Block : TextElement
public class Block : TextElement
Public Class Block Inherits TextElement
Windows 10 requirements
Windows 10 (introduced v10.0.10240.0)
Windows.Foundation.UniversalApiContract (introduced v1)
Block defines text formatting properties that should apply to all types of Block content. These properties are: LineHeight, LineStackingStrategy, Margin, and TextAlignment. Block also inherits the text formatting properties and other API of TextElement.
In the Windows Runtime XAML vocabulary the only block type is Paragraph. You use Paragraph to define the blocks of text to display within a RichTextBlock control. Every RichTextBlock should include at least one Paragraph.
BlockCollection is a strongly typed collection class that is used by the RichTextBlock.Blocks property. By specifying XAML object elements within a RichTextBlock, you can assign the block text content for the RichTextBlock. This is usually done using an implicit collection and XAML property syntax, such that the Paragraph elements appear as direct children of RichTextBlock in XAML markup. For example:
<RichTextBlock> <Paragraph>First paragraph.</Paragraph> <Paragraph>Second paragraph.</Paragraph> <Paragraph>Third paragraph. <Bold>With an inline.</Bold></Paragraph> </RichTextBlock>
Block derived classes
Block is the parent class for Paragraph.
The Windows Runtime XAML vocabulary doesn't support a Section class. If you're migrating XAML from Windows Presentation Foundation (WPF) or Microsoft Silverlight, use a Paragraph block element instead.
|Windows version||SDK version||Value added|
|Block() Block() Block() Block()||
Provides base class initialization behavior for Block derived classes.
|AccessKeyDisplayDismissed AccessKeyDisplayDismissed AccessKeyDisplayDismissed AccessKeyDisplayDismissed||
Occurs when the access key sequence is complete to notify controls that they should hide access key visuals.(Inherited from TextElement)
|AccessKeyDisplayRequested AccessKeyDisplayRequested AccessKeyDisplayRequested AccessKeyDisplayRequested||
Occurs when the access key sequence is started to notify controls that they should show access key visuals.(Inherited from TextElement)
|AccessKeyInvoked AccessKeyInvoked AccessKeyInvoked AccessKeyInvoked||
Occurs when a user completes an access key sequence to notify the element that the access key action should be invoked.(Inherited from TextElement)