Back to Devexpress

FreePosition.HorizontalAlignment Property

wpf-devexpress-dot-xpf-dot-charts-dot-freeposition-83122eff.md

latest2.4 KB
Original Source

FreePosition.HorizontalAlignment Property

Gets or sets how the annotation will be located horizontally.

Namespace : DevExpress.Xpf.Charts

Assembly : DevExpress.Xpf.Charts.v25.2.dll

NuGet Package : DevExpress.Wpf.Charts

Declaration

csharp
public AnnotationHorizontalAlignment HorizontalAlignment { get; set; }
vb
Public Property HorizontalAlignment As AnnotationHorizontalAlignment

Property Value

TypeDescription
AnnotationHorizontalAlignment

A AnnotationVerticalAlignment object specifying horizontal alignment.

|

Available values:

NameDescription
Left

The annotation is aligned to the left edge of a parent element.

| | Center |

The annotation is aligned to the center of the horizontal within a parent element.

| | Right |

The annotation is aligned to the right edge of a parent element.

|

Example

This example demonstrates how to customize the annotation layout when the Annotation.ShapePosition property is specified as the FreePosition type.

To do this, dock the annotation to the required element using the FreePosition.DockTarget property. Then, specify the FreePosition.VerticalAlignment and FreePosition.HorizontalAlignment properties, to configure the annotation position.

xaml
<dxc:Annotation.ShapePosition>
    <dxc:FreePosition HorizontalAlignment="Right" 
                      VerticalAlignment="Top" 
                      DockTarget="{Binding ElementName=defaultPane}"/>
</dxc:Annotation.ShapePosition>

See Also

FreePosition Class

FreePosition Members

DevExpress.Xpf.Charts Namespace