-2

I want to create a picker with posibillity of multi-select.

For that I'm trying to create a popup with a collection view with selection type multiple but I don't know how I can open the popup to a given x, y position.

Position witch will be provided in the popup's constructor

I'm using the CommunityToolkit.Maui.Views.Popup

The problem is that the popup seems to not have properties for position visible only for Size and Windows.X, Windows.Y but Windows is null

UPDATE: Popup.xaml.cs

public partial class MultiPicker : Popup
{
    public MultiPicker(double x, double y)
    {
        InitializeComponent();
        //Window is null
        this.Window.X = x;
        this.Window.Y = y;
        this.Size = new Size(200, 200);
    }
}

PageView.xaml.cs

   private async void TappedImageFirma(object sender, TappedEventArgs e)
{
  var (x, y) = e.GetPosition(sender as Image).Value;

  var popup = new MultiPicker(x, y);
  var res = await this.ShowPopupAsync(popup);
}

I want to open the popup just like a picker would, under the field that was clicked

Nicoara
  • 318
  • 2
  • 15
  • Please provide sufficient context and show what you've already tried. Make sure to read [how to ask a good question](https://stackoverflow.com/help/how-to-ask) in order to receive useful answers. – Julian Aug 27 '23 at 13:32

0 Answers0