[英]Can't set ZIndex in WPF
我有这样的xaml代码:
现在,我要的是:保持Height的The Black Grid ,然后设置Height的The Red WrapPanel至200 ,但The Red WrapPanel被限制The Black Grid 。 这将是这样的: 那么如何显示完整的The Red WrapPanel ? (条件:始终保持The Black Grid Height ,不允许调整大小或执行任何操作)我曾尝试使用Canvas.ZIndex,但仍然无法正常工作。 谢谢你们!
Height
The Black Grid
The Red WrapPanel
200
您可以使用负边距实现此目的。 像这样:
<WrapPanel Background="Red" Height="200" Margin="0 0 0 -100"/>
希望这对您有所帮助。
[英]Can't set Canvas ZIndex in WPF
[英]WPF ContentControl set ZIndex to child ZIndex
[英]How to set canvas ZIndex WPF button control in Click Event?
[英]WPF Binding a control's zindex to a property doesn't work
[英]Can I HitTest element with lower ZIndex in WPF Canvas?
[英]Can't set DialogResult in WPF
[英]zIndex on ComboBox in WPF?
[英]How to set ZIndex on StatusBarItem
[英]C# WPF - Adorner ZIndex
[英]Can't set button content - WPF
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.