menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class ToastPositionModel - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class ToastPositionModel

    Represents the positioning configuration for Toast notifications.

    Inheritance
    System.Object
    ToastPositionModel
    Namespace: Syncfusion.Blazor.Notifications
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public class ToastPositionModel : Object
    Remarks

    This class defines the X and Y coordinates for positioning Toast notifications within their target container. It provides precise control over where Toast messages appear on the screen or within specific UI regions.

    Examples
    var position = new ToastPositionModel
    {
        X = "Right",
        Y = "Top"
    };
    
    // This will position the Toast at the top-right corner

    Constructors

    ToastPositionModel()

    Declaration
    public ToastPositionModel()

    Properties

    X

    Gets or sets the horizontal position of the Toast notification relative to the target container.

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

    A string representing the X-axis position. Valid values are "Left", "Right", and "Center". Can be null.

    Remarks

    This property determines the horizontal placement of the Toast notification within its target container:

    • "Left" - Positions the Toast at the left edge of the container
    • "Right" - Positions the Toast at the right edge of the container
    • "Center" - Centers the Toast horizontally within the container
    The positioning is calculated relative to the container specified in the Target property.

    Y

    Gets or sets the vertical position of the Toast notification relative to the target container.

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

    A string representing the Y-axis position. Valid values are "Top" and "Bottom". Can be null.

    Remarks

    This property determines the vertical placement of the Toast notification within its target container:

    • "Top" - Positions the Toast at the top edge of the container
    • "Bottom" - Positions the Toast at the bottom edge of the container
    The positioning is calculated relative to the container specified in the Target property. Common combinations with the X property include "Top-Right", "Bottom-Left", "Top-Center", etc.
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved