答案 0 :(得分:3)
我认为最好的是通用 Flyout 。样品:
<Border Background="Transparent" Tapped="Border_Tapped">
<FlyoutBase.AttachedFlyout>
<Flyout Placement="Bottom">
<TextBox Header="Enter text" Text="{x:Bind myText.Text, Mode=TwoWay}"/>
</Flyout>
</FlyoutBase.AttachedFlyout>
<TextBlock x:Name="myText" Margin="50" Text="Sample text"/>
</Border>
代码背后:
private void Border_Tapped(object sender, TappedRoutedEventArgs e) =>
FlyoutBase.GetAttachedFlyout(sender as FrameworkElement).ShowAt(sender as FrameworkElement);