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

Gets or sets the BadgeControl‘s vertical alignment. This is a dependency property.

Namespace: DevExpress.Xpf.Core

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

NuGet Package: DevExpress.Wpf.Core

#Declaration

public VerticalAlignment VerticalAlignment { get; set; }

#Property Value

Type Default Description
VerticalAlignment Top

A VerticalAlignment enumeration value that specifies the BadgeControl‘s vertical alignment.

#Remarks

The following table lists the combinations of the Badge.VerticalAlignment and Badge.VerticalAnchor values:

 

VerticalAnchor

VerticalAlignment

Bottom

Center

Top

Stretch

Bottom

WPF Badges - VerticalAlignment.Bottom and VerticalAnchor.Bottom

WPF Badges - VerticalAlignment.Bottom and VerticalAnchor.Center

WPF Badges - VerticalAlignment.Bottom and VerticalAnchor.Top

WPF Badges - VerticalAlignment.Bottom and VerticalAnchor.Stretch

Center

WPF Badges - VerticalAlignment.Center and VerticalAnchor.Bottom

WPF Badges - VerticalAlignment.Center and VerticalAnchor.Center

WPF Badges - VerticalAlignment.Center and VerticalAnchor.Top

WPF Badges - VerticalAlignment.Center and VerticalAnchor.Stretch

Top

WPF Badges - VerticalAlignment.Top and VerticalAnchor.Bottom

WPF Badges - VerticalAlignment.Top and VerticalAnchor.Center

WPF Badges - VerticalAlignment.Top and VerticalAnchor.Top

WPF Badges - VerticalAlignment.Top and VerticalAnchor.Stretch

Stretch

WPF Badges - VerticalAlignment.Stretch and VerticalAnchor.Bottom

WPF Badges - VerticalAlignment.Stretch and VerticalAnchor.Center

WPF Badges - VerticalAlignment.Stretch and VerticalAnchor.Top

WPF Badges - VerticalAlignment.Stretch and VerticalAnchor.Stretch

Note

When the Badge.VerticalAlignment property is Stretch, the Badge.VerticalAnchor property is ignored.

The following code sample sets the Badge.VerticalAlignment and Badge.VerticalAnchor properties to Bottom:

<dx:SimpleButton ...>
  <dx:Badge.Badge>
    <dx:Badge Content="10" VerticalAlignment="Bottom" VerticalAnchor="Bottom" />
  </dx:Badge.Badge>
</dx:SimpleButton>
See Also