Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

Badge.HorizontalContentAlignment Property

Gets or sets the content’s horizontal alignment within the BadgeControl container. This is a dependency property.

Namespace: DevExpress.Xpf.Core

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public HorizontalAlignment HorizontalContentAlignment { get; set; }

#Property Value

Type Default Description
HorizontalAlignment Center

The HorizontalAlignment value that specifies the badge content’s horizontal alignment.

#Remarks

The following table lists the available Badge.HorizontalContentAlignment values:

Value Figure
Left WPF Badges - HorizontalContentAlignment.Left
Center WPF Badges - HorizontalContentAlignment.Center
Right WPF Badges - HorizontalContentAlignment.Right
Stretch WPF Badges - HorizontalContentAlignment.Stretch

The following code sample sets the Badge.HorizontalContentAlignment to Left:

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