alexa
menu

WPF

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

    Show / Hide Table of Contents

    Class ToastAction

    Represents an action button for a toast notification. Actions can provide serialized arguments or a callback handler depending on the hosting scenario.

    Inheritance
    System.Object
    ToastAction
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Syncfusion.UI.Xaml.SfToastNotification
    Assembly: Syncfusion.SfToastNotification.WPF.dll
    Syntax
    public sealed class ToastAction

    Constructors

    ToastAction(String, String, Action)

    Initializes a new instance of the ToastAction class.

    Declaration
    public ToastAction(string label, string arguments = null, Action callback = null)
    Parameters
    Type Name Description
    System.String label

    The text label displayed on the action button.

    System.String arguments

    Serialized arguments associated with this action (used by native activation handlers).

    System.Action callback

    Callback invoked when the action is executed in in-app scenarios.

    Properties

    ActionTemplate

    Custom System.Windows.DataTemplate for rendering this action button. If set, it overrides the default template.

    Declaration
    public DataTemplate ActionTemplate { get; set; }
    Property Value
    Type
    System.Windows.DataTemplate

    Arguments

    Gets or sets the serialized arguments associated with this action. These arguments may be used by platform activation handlers when the toast is represented natively.

    Declaration
    public string Arguments { get; set; }
    Property Value
    Type
    System.String

    Callback

    Gets or sets the callback invoked when this action is executed in in-app scenarios.

    Declaration
    public Action Callback { get; set; }
    Property Value
    Type
    System.Action

    CloseOnClick

    Gets or sets a value indicating whether the toast should close after this action is invoked.

    Declaration
    public bool CloseOnClick { get; set; }
    Property Value
    Type
    System.Boolean

    IsPrimary

    Hint that templates may use to render this action as the primary button.

    Declaration
    public bool IsPrimary { get; }
    Property Value
    Type
    System.Boolean

    Label

    Gets or sets the display label text shown on the action button.

    Declaration
    public string Label { get; set; }
    Property Value
    Type
    System.String
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved