0

How to set popup placement target on bottom? Please see this screenshot.

I want to place the popup on bottom. I have click on three dots on grid header control, but I can not set popup position exact on three dots button.

<toolkit:Popup xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
               xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
               xmlns:toolkit="http://schemas.microsoft.com/dotnet/2022/maui/toolkit"
         x:Class="PopupPosition.PopupView"
         HorizontalOptions="Center" VerticalOptions="End">
</toolkit:Popup>

private void btnShow_Clicked(object sender, EventArgs e)
{
    var popupview = new PopupView();
    popupview.Anchor = btnShow;
    popupview.Anchor.TranslateTo(0, 0);

    this.ShowPopup(popupview);
}

    <ItemGroup>
        <PackageReference Include="CommunityToolkit.Maui" Version="9.0.2" />
        <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0"/>
    </ItemGroup>

    <ItemGroup>
      <PackageReference Include="Microsoft.Maui.Controls" Version="8.0.70" />
    </ItemGroup>

    <ItemGroup>
      <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="8.0.70" />
    </ItemGroup>
0

1 Answer 1

0

I want to place the popup on bottom. I have click on three dots on grid header control, but I can not set popup position exact on three dots button.

Like Liqun said: You can wrap the layout with a Border and set the BackgroundColor of Border to transparent and set the margin for the layout in the Border. But to be honest, it's not elegant enough. You can ask a feature request on GitHub, let our developers know and deal with it.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.