如何在弹出按钮(XAML)中选择文本块?
我的XAML代码:如何在弹出按钮(XAML)中选择文本块?,xaml,uwp,Xaml,Uwp,我的XAML代码: <AppBarButton> <AppBarButton.Flyout> <Flyout> <TextBlock Text="Text is not selectable here" IsTextSelectionEnabled="True"/> </Flyout> </AppBarButton.Flyout> </AppBar
<AppBarButton>
<AppBarButton.Flyout>
<Flyout>
<TextBlock Text="Text is not selectable here" IsTextSelectionEnabled="True"/>
</Flyout>
</AppBarButton.Flyout>
</AppBarButton>
尽管我将IsTextSelectionEnabled设置为“已启用”,但在弹出框中无法选择文本。
可以选择文本吗?我尝试了RichTextBlock,但效果不太好。您可以尝试在AppBarButton上将属性设置为true以获得焦点
<AppBarButton AllowFocusOnInteraction="True">
<AppBarButton.Flyout>
<Flyout>
<TextBlock Text="Text is not selectable here" IsTextSelectionEnabled="True"/>
</Flyout>
</AppBarButton.Flyout>
</AppBarButton>