如何在WPF中控制其他控件的控件? [英] How to make a control front of other control in WPF?
问题描述
我尝试过的:
< wrappanel panel.zindex = 1>
< textbox name = z width = 20>
< listbox width = 20 visibility = hidden>
< textbox name = x width = 20>
当我在文本框中输入字母时,它将数据绑定到列表框并使列表框可见。并且它的扩展意味着它的大小。这个名为x的主要文本框也会下降。我想让这个列表框位于x文本框的前面。我不想让它扩展。
如果有人知道这个,请你帮我解决这个问题
中,WrapPanel正如它的名字所暗示的那样 - 它包裹物体以填充可用空间。我怀疑你在想什么是StackPanel - 这会根据你设置方向的方式水平或垂直堆叠项目。
iam using textbox and listbox when i type "a" in textbox it shows "a" based words in listbox but down that list box i have other controls too.i made listbox to be visible only when data is binded to it from database .but the problem is its size is getting increased.i want to show it above the controls .is it possible using wpf.
What I have tried:
<wrappanel panel.zindex=1>
<textbox name=z width=20>
<listbox width=20 visibility=hidden>
<textbox name=x width=20>
when i enter letter in textbox it binds data to listbox and makes listbox to be visible.and its getting extended means its size .this leading textbox named as x also going down .i want to make this listbox to be front of x textbox .i dont want to get it extended.
if anyones know this ,can you please help me over this issue
A WrapPanel does just what it's name would suggest - it wraps objects around to fill available space. I suspect what you are thinking of is a StackPanel - this "stacks" the items either horizontally or vertically depending on how you set its Orientation.
这篇关于如何在WPF中控制其他控件的控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!