gpt4 book ai didi

c# - 通用 Windows 应用程序中的 BringToFront/SetZIndex

转载 作者:太空宇宙 更新时间:2023-11-03 19:56:36 24 4
gpt4 key购买 nike

显然 Grid.SetZIndex()不存在。因为没有 ctrl.SetValue(Grid.ZIndexProperty…) .

那么如何将 Grid 的子元素置于最前面?

最佳答案

ZIndex 仅在 Canvas 控件内有效。

<Canvas>
<Grid Canvas.ZIndex="0"/>
<Grid Canvas.ZIndex="1"/>
</Canvas>

否则,例如在 grid 中,文档大纲中的位​​置决定了 z 索引。也就是说,它在你的 XAML 页面中的位置越靠后,它在 Z 索引中的位置就越高。

祝你好运!

关于c# - 通用 Windows 应用程序中的 BringToFront/SetZIndex,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33089525/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com