Intersoft ClientUI Documentation
Floater Class
Members 



Provides an inline-level flow content element used to host a floater. A floater displays images and other content parallel to the main content flow in a FlowDocument.
Object Model
Floater ClassBlockCollection ClassBlock ClassBorderStyle Class
Syntax
Public Class Floater 
   Inherits AnchoredBlock
Dim instance As Floater
public class Floater : AnchoredBlock 
public ref class Floater : public AnchoredBlock 
Remarks

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.

Inheritance Hierarchy

System.Object
   System.Windows.DependencyObject
      Intersoft.Client.Documents.TextElement
         Intersoft.Client.Documents.Inline
            Intersoft.Client.Documents.AnchoredBlock
               Intersoft.Client.Documents.Floater

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

Floater Members
Intersoft.Client.Documents Namespace

Send Feedback