Skip to main content
A newer version of this page is available. .

FreePosition.HorizontalAlignment Property

Gets or sets how the annotation will be located horizontally.

Namespace: DevExpress.Xpf.Charts

Assembly: DevExpress.Xpf.Charts.v19.1.dll

Declaration

public AnnotationHorizontalAlignment HorizontalAlignment { get; set; }

Property Value

Type Description
AnnotationHorizontalAlignment

A AnnotationVerticalAlignment object specifying horizontal alignment.

Available values:

Name Description
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.

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

The following code snippets (auto-collected from DevExpress Examples) contain references to the HorizontalAlignment property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also