menu

Blazor

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

    Show / Hide Table of Contents

    Class PositionDataModel

    Represents the position data model for defining popup element positioning coordinates and alignment.

    Inheritance
    System.Object
    PositionDataModel
    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 string value that specifies the horizontal positioning. This can be alignment keywords like "left", "center", "right" or numeric pixel values. The default value is null.

    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 string value that specifies the vertical positioning. This can be alignment keywords like "top", "center", "bottom" or numeric pixel values. The default value is null.

    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.

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