ContentDialog 不应成为焦点
ContentDialog should not be in focus
我有一个按钮。按下按钮时,会弹出一个 ContentDialog。 ContentDialog 背后的背景将其颜色从当前颜色更改为灰色。我无法在 ContentDialog 之外执行任何操作。 ContentDialog 获得了完整的焦点。
这是我想要实现的场景。
我将文本加载到我的程序中。
我单击 Button 以打开 ContentDialog。当 ContentDialog 在前面时,我希望能够对文本执行操作(例如滚动文本 up/down)。此外,文本应保持其正常颜色,就像 ContentDialog 未打开一样。这可能吗?
XAML:
<Button x:Name="ContentBtn" Style="{StaticResource AppBarButtonStyle}" Click="ContentBtn_Click">
<ContentDialog x:Name="ContentDialog" Title="This is an example" PrimaryButtonText="Ok"></ContentDialog>
</Button>
CS:
private async void ContentBtn_Click(object sender, RoutedEventArgs e)
{
await ContentDialog.ShowAsync();
}
使用 ContentDialog 是不可能的。
来自文档:
Dialogs are modal UI overlays that provide contextual app information.
Dialogs block interactions with the app window until being explicitly
dismissed. They often request some kind of action from the user. [source]
我有一个按钮。按下按钮时,会弹出一个 ContentDialog。 ContentDialog 背后的背景将其颜色从当前颜色更改为灰色。我无法在 ContentDialog 之外执行任何操作。 ContentDialog 获得了完整的焦点。
这是我想要实现的场景。
我将文本加载到我的程序中。
我单击 Button 以打开 ContentDialog。当 ContentDialog 在前面时,我希望能够对文本执行操作(例如滚动文本 up/down)。此外,文本应保持其正常颜色,就像 ContentDialog 未打开一样。这可能吗?
XAML:
<Button x:Name="ContentBtn" Style="{StaticResource AppBarButtonStyle}" Click="ContentBtn_Click">
<ContentDialog x:Name="ContentDialog" Title="This is an example" PrimaryButtonText="Ok"></ContentDialog>
</Button>
CS:
private async void ContentBtn_Click(object sender, RoutedEventArgs e)
{
await ContentDialog.ShowAsync();
}
使用 ContentDialog 是不可能的。
来自文档:
Dialogs are modal UI overlays that provide contextual app information. Dialogs block interactions with the app window until being explicitly dismissed. They often request some kind of action from the user. [source]