Class ToastPositionModel
Represents the positioning configuration for Toast notifications.
Inheritance
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 |
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
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 |
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