Intersoft.Client.Documents Namespace > Floater Class : HorizontalAlignment Property |
Public Property HorizontalAlignment As HorizontalAlignment
Dim instance As Floater Dim value As HorizontalAlignment instance.HorizontalAlignment = value value = instance.HorizontalAlignment
public HorizontalAlignment HorizontalAlignment {get; set;}
public: property HorizontalAlignment HorizontalAlignment { HorizontalAlignment get(); void set ( HorizontalAlignment value); }
AnchoredBlock is an abstract class that provides a base for Inline elements that are used to anchor Block elements to flow content. In WPF, AnchoredBlock is inherited to Floater and Figure elements. Currently, Intersoft FlowDocument only supports Floater element.
Floater are used to embed content to FlowDocument with placement properties that can be customized independent of the primary content flow. Floater elements are often used to highlight or accentuate portions of content, to host supporting images or other content within the main content flow, or to inject loosely related content such as advertisements. Floater is a good place to put more free-flowing content that flows similar to the main page content, but is separated from it.
Floater can host multiple Block elements. You can specify a specific width to Floater element using Width property. Floater element can be horizontally aligned, either to the Left, Center, Right, or Stretch. The other content contained within the same Block element will flow around Floater element if the space is available.
As the child of AnchoredBlock, Floater inherits the behavior of AnchoredBlock class. You can specify several properties that are usually available in Block element, such as border and line spacing formatting, Margin, Padding, and TextAlignment. If Margin and Padding properties are not specified, Floater element will automatically use 10 pixel for each property.
XAML |
Copy Code
|
---|---|
<Intersoft:FlowDocument> <Intersoft:Paragraph SpacingBefore="20"> <Intersoft:Floater Width="190" HorizontalAlignment="Left" Padding="0" Margin="20"> <Intersoft:BlockUIContainer> <Image Source="/Assets/Images/screenshot.png" Stretch="None"/> </Intersoft:BlockUIContainer> </Intersoft:Floater> <Intersoft:Bold> <Intersoft:Run Text="SINGAPORE, "/> </Intersoft:Bold> <Intersoft:Run> Nov 16 (Reuters) - Gold prices fell as much as 1.1 percent on Wednesday, tracking the euro lower on fears the euro zone debt crisis could spread to France, the bloc's second-largest economy, while Greece and Italy battle to save their economies. </Intersoft:Run> <Intersoft:LineBreak/> <Intersoft:Run> People favour gold during economic and political turmoil because of its safe haven allure, although bullion has moved in close correlation with riskier assets recently, as harried investors liquidate gold positions to cover losses elsewhere. </Intersoft:Run> </Intersoft:Paragraph> </Intersoft:FlowDocument> |
If the content of Floater element exceeds the page boundaries, it will paginates to the next page. When Floater element paginates to the next page, it will maintain the Margin and Padding configuration. The following screenshot shows how Floater element will paginate if the content exceeds the page boundaries.
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