如何在WPF中控制其他控件的控件? [英] How to make a control front of other control in WPF?

查看:160
本文介绍了如何在WPF中控制其他控件的控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在文本框中键入a时,我使用文本框和列表框,它在列表框中显示a基于单词,但在该列表框中,我还有其他控件.i使列表框仅在数据绑定到它时才可见数据库。但问题是它的大小正在增加。我想在控件上方显示它。是否可以使用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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆