All docs
V20.2
21.2
21.1
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
A newer version of this page is available. Switch to the current version.

Badge.HorizontalAnchor Property

Gets or sets a BadgeControl‘s horizontal anchor point. This is a dependency property.

Namespace: DevExpress.Xpf.Core

Assembly: DevExpress.Xpf.Core.v20.2.dll

Declaration

public HorizontalAlignment HorizontalAnchor { get; set; }

Property Value

Type Default Description
HorizontalAlignment

Center

The HorizontalAlignment value that specifies the badge’s horizontal anchor point.

Remarks

The following table lists the combinations of the Badge.HorizontalAnchor and Badge.HorizontalAlignment values :

 

HorizontalAnchor

HorizontalAlignment

Left

Center

Right

Stretch

Left

WPF Badges - HorizontalAlignment.Left and HorizontalAnchor.Left

WPF Badges - HorizontalAlignment.Left and HorizontalAnchor.Center

WPF Badges - HorizontalAlignment.Left and HorizontalAnchor.Right

WPF Badges - HorizontalAlignment.Left and HorizontalAnchor.Stretch

Center

WPF Badges - HorizontalAlignment.Center and HorizontalAnchor.Left

WPF Badges - HorizontalAlignment.Center and HorizontalAnchor.Center

WPF Badges - HorizontalAlignment.Center and HorizontalAnchor.Right

WPF Badges - HorizontalAlignment.Center and HorizontalAnchor.Stretch

Right

WPF Badges - HorizontalAlignment.Right and HorizontalAnchor.Left

WPF Badges - HorizontalAlignment.Right and HorizontalAnchor.Center

WPF Badges - HorizontalAlignment.Right and HorizontalAnchor.Right

WPF Badges - HorizontalAlignment.Right and HorizontalAnchor.Stretch

Stretch

WPF Badges - HorizontalAlignment.Stretch and HorizontalAnchor.Left

WPF Badges - HorizontalAlignment.Stretch and HorizontalAnchor.Center

WPF Badges - HorizontalAlignment.Stretch and HorizontalAnchor.Right

WPF Badges - HorizontalAlignment.Stretch and HorizontalAnchor.Stretch

Note

When Badge.HorizontalAnchor is Stretch, the anchor point gets the value from the Badge.HorizontalAlignment property.

The following code sample sets the Badge.HorizontalAnchor and Badge.HorizontalAlignment properties to Left:

<dx:SimpleButton ...>
  <dx:Badges.Badge>
    <dx:Badge Content="10" HorizontalAnchor="Left" HorizontalAlignment="Left" />
  </dx:Badges.Badge>
</dx:SimpleButton>
See Also