为什么模态WPF窗口禁用没有共同所有者的无模式窗口?

时间:2015-12-23 16:34:43

标签: c# wpf dialog modal-dialog modeless

如果主WPF窗口创建一个没有指定所有者的无模式窗口,然后它创建一个模态窗口,为什么无模式窗口被禁用?这是一个说明问题的代码片段。

xaml:

    onView(withChild(withChild(withId(R.id.action_bar_main))))
            .check(matches(isDisplayed));

背后的代码:

<Window x:Class="ModalTest.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    Title="MainWindow">
    <Button Content="Show modal window" Click="buttonShowModalWindow_OnClick" />

谢谢!

0 个答案:

没有答案
相关问题