0
Ich bin neu in uwp.i müssen Rechner mit Flyout-Funktion zu erstellen.wie open flyout auf textbox fokus bekommen? Mit uwp
wie zu öffnen Flyout unterhalb der Textbox auf Textbox bekam den Fokus.
Ich bin neu in uwp.i müssen Rechner mit Flyout-Funktion zu erstellen.wie open flyout auf textbox fokus bekommen? Mit uwp
wie zu öffnen Flyout unterhalb der Textbox auf Textbox bekam den Fokus.
benutzte ich TextBlock- statt Textbox, aber Sie können das ändern:
<TextBlock Text="Textblock with MenuFlyout" Height="20" Tapped="TextBlock_Tapped" x:Name="MyTextBlock">
<FlyoutBase.AttachedFlyout>
<MenuFlyout x:Name="Flyout">
<MenuFlyout.Items>
<MenuFlyoutItem>
Click Me
</MenuFlyoutItem>
</MenuFlyout.Items>
</MenuFlyout>
</FlyoutBase.AttachedFlyout>
</TextBlock>
Der Code hinter dem TextBlock_Tapped Ereignis:
private void TextBlock_Tapped(object sender, TappedRoutedEventArgs e)
{
Flyout.ShowAt(MyTextBlock);
}