简体   繁体   English

如何将ListView控件置于WPF中的其他控件之上

[英]How I can bring ListView control in top of other controls in WPF

I have a ListView control which is behind other controls. 我有一个在其他控件后面的ListView控件。 I cant set parent nor use BringInFront function like in winforms to make it front. 我不能设置父级,也不能像在winforms中那样使用BringInFront函数来使其居于前面。 How I can achieve this in WPF? 我如何在WPF中实现这一目标? Bring ListView control in top of other controls. 将ListView控件置于其他控件的顶部。

You can set the ZIndex Property to the maximum. 您可以将ZIndex属性设置为最大值。

Read this 这个

OR 要么

Alternatively, just move the ListView control to the bottom of the declarations inside the Grid (z-order is bottom (highest) to top (lowest)). 或者,只需将ListView控件移动到Grid内声明的底部(z顺序是底部(最高)到顶部(最低))。 Perhaps a bit counterintuitive. 也许有点违反直觉。

You can do this, 你可以这样做,

Goto View->Designer (Shift+f7) 转到视图->设计器(Shift + f7)

Right Click your ListView , 右键单击您的ListView,

Order->Bring To Front 订单->带到前面

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在WPF控件/控件集中获得与具有链接到其他页面内容的HTML相同的行为? - How can I get the same behavior in a WPF control/set of controls as that of HTML with links to other page content? 如何在其中包含许多控件的控件上绘制图形? (Z顺序最高) - How can i draw on top of an control which has many controls in it? (Z-order top) 如何创建一个在其他控件之上工作的透明控件? - How to create a transparent control which works when on top of other controls? 如何基于绑定列表构建包含其他控件的 WPF 控件 - How to build a WPF control containing other controls based on a bound list 对其他控件上方的控件高度进行动画处理 - Animate control height over the top of other controls 如何控制控件的加载顺序? - How can I control the loading sequence of controls? 如何使面板控件出现在所有其他控件的下面? - How can I make a panel control appear underneath all other controls? 如何阻止移动的用户控件与其他相同类型的用户控件相交? - How can I stop a moving user control from intersecting with other user controls of the same type? 使用 WPF,如何以编程方式禁用在 XAML 中为 Listview 控件创建的按钮? - Using WPF, how can I programmatically disable buttons that were created in XAML for a Listview control? 如何在C#WPF中继承其他形式的控件? - How do I inherit controls in other form in C# WPF?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM