Skip to main content

Badge.CustomPlacement Event

Occurs when a Badge is arranged.

Namespace: DevExpress.Xpf.Core

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

NuGet Package: DevExpress.Wpf.Core

Declaration

public event CustomBadgePlacementCallback CustomPlacement

Remarks

The following code sample displays a Badge at the specified point on the CustomPlacement event:

WPF Badges - CustomPlacement Event

<Button Content="Open">
   <dx:Badges.Badge>
       <dx:Badge Content="10" CustomPlacement="OnBadgeCustomPlacement"/>
   </dx:Badges.Badge>
</Button>
Rect OnBadgeCustomPlacement(Size badgeSize, Rect targetBounds, Rect precomputed) {
   return new Rect(new Point(15, 10), badgesize);
}
See Also