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.VerticalContentAlignment Property

Gets or sets the content’s vertical 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 VerticalAlignment VerticalContentAlignment { get; set; }

#Property Value

Type Default Description
VerticalAlignment Center

The VerticalAlignment value that specifies the BadgeControl content’s vertical alignment.

#Remarks

Note

The Badge.VerticalContentAlignment property is only applicable if the Badge.VerticalAlignment is set to Stretch.

The following table lists the available Badge.VerticalContentAlignment values:

Value Figure
Bottom WPF Badges - VerticalContentAlignment.Bottom
Center WPF Badges - VerticalContentAlignment.Center
Top WPF Badges - VerticalContentAlignment.Top
Stretch WPF Badges - VerticalContentAlignment.Stretch

The following code sample sets the Badge.VerticalContentAlignment to Top:

<dx:SimpleButton ...>
  <dx:Badge.Badge>
    <dx:Badge Content="10" VerticalAlignment="Stretch" 
    VerticalContentAlignment="Top" />
  </dx:Badge.Badge>
</dx:SimpleButton>
See Also