Xceed Toolkit for .NET Maui v2.0 Documentation
Xceed.Maui.Toolkit Assembly / Xceed.Maui.Toolkit Namespace / Popup Class
Members Example


In This Topic
    Popup Class
    In This Topic
    Represents a popup window that appears over the application.
    Syntax
    'Usage
     
    
    Dim instance As Popup
    Remarks

    The Popup can use any View as its Content and can be modal or not. It can be positioned on any side or corner relative to the Window, the Popup's parent or a View that serves as an anchor.

    Note that it can be useful to define a Popup within the code beforehand & then display it when needed.

    For xaml definition, a PopupContainer can be used.

    Example

    In the following example, a Popup is created & then opened when a Button is clicked. The opened Popup is positioned at the bottom right of the sender, which in this case is said Button. The Popup's Content is made of a Border containing a Label that displays some text.

    Visually, the code below would display this control:

    private void Button_Clicked( object sender, EventArgs e )
    {
      var contentBorder = new Border()
      {
        Background = Colors.LightGray,
        BorderBrush = Colors.Orange,
        BorderThickness = 3,
        Content = new Label() { Text = "My Popup...", TextColor = Colors.Red }
      };
    
      var popup = new Popup()
      {
        Content = contentBorder,
        IsModal = false,
        Anchor = sender as View,
        HorizontalOptions = LayoutOptions.End,
        VerticalOptions = LayoutOptions.End
      };
    
      popup.Open();
    }
    Inheritance Hierarchy

    System.Object
       Microsoft.Maui.Controls.BindableObject
          Microsoft.Maui.Controls.Element
             Microsoft.Maui.Controls.NavigableElement
                Microsoft.Maui.Controls.VisualElement
                   Microsoft.Maui.Controls.View
                      Xceed.Maui.Toolkit.Popup

    Public Constructors
     NameDescription
    Public Constructor  
    Top
    Public Fields
    Protected Fields
     NameDescription
    Protected Field (Inherited from Microsoft.Maui.Controls.View)
    Top
    Public Properties
     NameDescription
    Public PropertyGets or sets the View that will be used as the Popup's anchor point.  
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.Element)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.NavigableElement)
    Public Property (Inherited from Microsoft.Maui.Controls.Element)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public PropertyGets or sets the View that will be used as the Popup's content.  
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Property (Inherited from Microsoft.Maui.Controls.Element)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.View)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.View)
    Public Property (Inherited from Microsoft.Maui.Controls.Element)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public PropertyGets or sets if the Popup is modal.  
    Public PropertyGets or sets if the Popup is open.  
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.View)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.NavigableElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.Element)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.NavigableElement)
    Public Property (Inherited from Microsoft.Maui.Controls.NavigableElement)
    Public Property (Inherited from Microsoft.Maui.Controls.Element)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.View)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Property (Inherited from Microsoft.Maui.Controls.VisualElement)
    Top
    Protected Properties
    Public Methods
     NameDescription
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public MethodOverloaded.  (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public MethodCloses the Popup.  
    Public MethodOverloaded.  (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Method (Inherited from Microsoft.Maui.Controls.View)
    Public Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public MethodOpens the Popup.  
    Public Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Method (Inherited from Microsoft.Maui.Controls.Element)
    Public MethodOverloaded.  (Inherited from Microsoft.Maui.Controls.BindableObject)
    Public Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Public MethodUpdates the Popup's dimensions.  
    Top
    Protected Methods
     NameDescription
    Protected Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Internal Method (Inherited from Microsoft.Maui.Controls.View)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Internal Method (Inherited from Microsoft.Maui.Controls.View)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected MethodOverridden.   
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method  
    Protected Method (Inherited from Microsoft.Maui.Controls.Element)
    Protected Method (Inherited from Microsoft.Maui.Controls.Element)
    Protected Method  
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.Element)
    Protected Method (Inherited from Microsoft.Maui.Controls.Element)
    Protected Method (Inherited from Microsoft.Maui.Controls.NavigableElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.Element)
    Protected Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.VisualElement)
    Protected Method (Inherited from Microsoft.Maui.Controls.BindableObject)
    Top
    Public Events
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also