Class PositionDataModel
Represents the position data model for defining popup element positioning coordinates and alignment.
Inheritance
Namespace: Syncfusion.Blazor.Popups
Assembly: Syncfusion.Blazor.dll
Syntax
public class PositionDataModel : Object
Remarks
The PositionDataModel class provides string-based position values that can specify both alignment keywords (such as "left", "center", "right" for X-axis and "top", "center", "bottom" for Y-axis) and numeric offset values. This flexible approach allows for both relative positioning and precise pixel-based positioning.
Examples
Configuring position data with alignment keywords.
var positionData = new PositionDataModel
{
X = "center",
Y = "top"
};
// Or with numeric values
var positionDataNumeric = new PositionDataModel
{
X = "100",
Y = "50"
};
Constructors
PositionDataModel()
Declaration
public PositionDataModel()
Properties
X
Gets or sets the horizontal position value for the popup element.
Declaration
public string X { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property defines the horizontal alignment or offset for the popup element.
Supported alignment values include "left", "center", and "right".
Numeric string values are treated as pixel offsets from the reference point.
If null
, the default horizontal positioning behavior will be applied.
Y
Gets or sets the vertical position value for the popup element.
Declaration
public string Y { get; set; }
Property Value
Type | Description |
---|---|
System.String | A |
Remarks
This property defines the vertical alignment or offset for the popup element.
Supported alignment values include "top", "center", and "bottom".
Numeric string values are treated as pixel offsets from the reference point.
If null
, the default vertical positioning behavior will be applied.