Windows通用应用程序 - 显示父控件的弹出网格

时间:2015-05-05 09:54:03

标签: c# wpf windows xaml universal

我很难在Photoshop中找到与what I painted类似的内容(耗时超过9000小时)。

基本上我们用于平板电脑的Windows应用程序需要一个控件,可在单击时显示屏幕上的网格。数据创建和网格准备发生在控件的代码隐藏中,我不知道如何在我的控件之外绘制网格。如果我能在父边界之外得到它,即使是简单的弹出控制也没问题。

1 个答案:

答案 0 :(得分:1)

你可以使用弹出窗口:

<Button Width="100" Height="100" Background="Black">
    <Button.Flyout>
        <Flyout Placement="Bottom">
            <Grid Width="200" Height="200">
                <StackPanel>
                    <Rectangle Fill="Red" Width="100" Height="100" />
                    <Rectangle Fill="Green" Width="100" Height="100" />
                </StackPanel>
            </Grid>
        </Flyout>
    </Button.Flyout>
</Button>

你也可以准备自己的弹出窗口:

How to center a popup in window (Windows store apps)

相关问题