Figure.HorizontalOffset Property
.NET Framework 4.5
Gets or sets a value that indicates the distance that a Figure is offset from its baseline in the horizontal direction.
Namespace: System.Windows.Documents
Assembly: PresentationFramework (in PresentationFramework.dll)
XMLNS for XAML: http://schemas.microsoft.com/winfx/2006/xaml/presentation, http://schemas.microsoft.com/netfx/2007/xaml/presentation
'Declaration <TypeConverterAttribute(GetType(LengthConverter))> _ Public Property HorizontalOffset As Double
<object HorizontalOffset="double"/> - or - <object HorizontalOffset="qualifiedDouble"/>
XAML Values
Property Value
Type: System.DoubleThe distance that a Figure is offset from its baseline in the horizontal direction, in device independent pixels.
The default value is 0.0.
The following example shows how to set the HorizontalOffset attribute of a Figure element.
<FlowDocument> <Paragraph> <Figure Name="myFigure" Width="140" Height="50" HorizontalAnchor="PageCenter" VerticalAnchor="PageCenter" HorizontalOffset="100" VerticalOffset="20" WrapDirection="Both" /> </Paragraph> </FlowDocument>
The following example shows how to set the HorizontalOffset property programmatically.
Dim figx As New Figure() With figx .Name = "myFigure" .Width = New FigureLength(140) .Height = New FigureLength(50) .HorizontalAnchor = FigureHorizontalAnchor.PageCenter .VerticalAnchor = FigureVerticalAnchor.PageCenter .HorizontalOffset = 100 .VerticalOffset = 20 .WrapDirection = WrapDirection.Both End With Dim parx As New Paragraph(figx) Dim flowDoc As New FlowDocument(parx)
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.