menu

Blazor

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

    Show / Hide Table of Contents

    Class TargetType

    Defines the types of target elements for positioning popup components.

    Inheritance
    System.Object
    TargetType
    Namespace: Syncfusion.Blazor.Popups
    Assembly: Syncfusion.Blazor.dll
    Syntax
    public sealed class TargetType : Enum
    Remarks

    The TargetType enumeration specifies how the popup element should be positioned relative to its target element. This affects the positioning behavior and reference point used by the popup component.

    Examples

    Usage of TargetType in popup configuration.

    <SfPopup TargetType="TargetType.Relative">
        <!-- Popup content -->
    </SfPopup>

    Fields

    Container

    Specifies that the popup should be positioned relative to the container element.

    Declaration
    public const TargetType Container
    Field Value
    Type
    TargetType
    Remarks

    When set to Container, the popup position is calculated based on the container's boundaries. This is useful for creating popups that stay within specific container boundaries.

    Relative

    Specifies that the popup should be positioned relative to the target element.

    Declaration
    public const TargetType Relative
    Field Value
    Type
    TargetType
    Remarks

    When set to Relative, the popup position is calculated based on the target element's position and dimensions. This is useful when you want the popup to appear in relation to a specific UI element.

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