WinUI

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class BadgeContainer

    Show / Hide Table of Contents

    Class BadgeContainer

    Represents a container which acts as host to load any UI Element and set overlay for the control using badge control.

    Inheritance
    System.Object
    BadgeContainer
    Implements
    System.IDisposable
    Namespace: Syncfusion.UI.Xaml.Notifications
    Assembly: Syncfusion.Notifications.WinUI.dll
    Syntax
    public class BadgeContainer : ContentControl, IDisposable
    Examples

    Following example shows how to add a SfBadge over a Microsoft.UI.Xaml.Controls.Button control.

    <syncfusion:BadgeContainer>
        <syncfusion:BadgeContainer.Content>
            <Button
                Content = "Mail Box"
                Width="120"
                Height="60"/>
        </syncfusion:BadgeContainer.Content>
        <syncfusion:BadgeContainer.Badge>
            <syncfusion:SfBadge
                Shape = "Oval"
                Fill="Accent"
                AnimationType="Scale"
                Content="10"/>
        </syncfusion:BadgeContainer.Badge>
    </syncfusion:BadgeContainer>

    Constructors

    BadgeContainer()

    Initializes a new instance of the BadgeContainer class.

    Declaration
    public BadgeContainer()

    Fields

    BadgeProperty

    Identifies Badge dependency property.

    Declaration
    public static readonly DependencyProperty BadgeProperty
    Field Value
    Type Description
    Microsoft.UI.Xaml.DependencyProperty

    Properties

    Badge

    Gets or sets the SfBadge that displays an overlay over content of BadgeContainer.

    Declaration
    public SfBadge Badge { get; set; }
    Property Value
    Type Description
    SfBadge

    An instance of SfBadge.

    Methods

    Dispose()

    Release the unmanaged resources of BadgeContainer.

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Release the unmanaged resources of BadgeContainer.

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    Used to indicate perform dispose or not.

    Implements

    System.IDisposable

    See Also

    SfBadge
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved