构建没有边框和关闭按钮的窗口的最佳方法,并有一些文本框和按钮 [英] The best way to build window that has no border and close button, and has some textboxes and buttons

查看:77
本文介绍了构建没有边框和关闭按钮的窗口的最佳方法,并有一些文本框和按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我的项目有很多数据表,即SQL表,为了填充这些表,我必须构建一个获取值的UI,并将它们发送到SQL。 br />
无论如何,我的问题不在于SQL Transitions,而在于构建UI,它将根据屏幕分辨率,宽度和高度动态调整大小。

想象一下我有Windows Office Rich UI 2007功能区,我想在其中放入一个矩形(圆角),这个矩形有标签,textBoxes,Like(GivenName,LastName和....),每个标签的infornt都有一个textBox,用于输入数据。

我需要使用什么控件,包含这个标签和textBoxes,它们将根据目标屏幕分辨率自动排列。
因为我正在使用labtop,在设计时,我可以看到它们与我在22(英寸)等更宽屏幕中看到的不同。在这个更宽的屏幕上,我将在控件之间获得更宽的距离,如果我锁定控件以便在它们之间保持静态边距,但是在右侧,当我使用更宽的屏幕时,那么我将获得没有控件的巨大空间。

我们如何解决?



谢谢你

Hi,

My project has many dataTables , which is SQL Tables, and in order to fill that tables , I have to build a UI which takes values , and send them to the SQL.

Anyway, my problem is not in the SQL Transitions, but in building the UI, which will resizing dynamically according to the screen resolution , width , and height.

Imagine that I have Windows Office Rich UI 2007 ribbon, and I want to put inside it a rectangle (Circular Corners), and this rectangle has lables, and textBoxes, Like (GivenName , LastName , and ....) , infornt of every label there is a textBox in order to enter the data.

What control I have to use , which contains this Labels , and textBoxes, that will arrange them automatically according to the target screen resolution.

since I am using labtop, and in design time, I can see them different from what I will see them in wider screen like 22(Inch). In this wider screen I will get wider distances between the controls, and if I lock the controls in order to keeo static margins between them , but in the right side , and when I use wider screen , then I will get huge space with no controls.

How can we solve that??




Thank you

推荐答案

您需要坐下来玩所有布局控件。你会发现每个人都有自己的怪癖。例如,stackpanel很好地堆叠项目,但不会垂直调整子项的大小,而是水平调整。 UniformGrid始终尝试维护子节点的NxN矩阵。在我有限的经验中,我发现使用 Grid 是最好的全能布局容器。虽然它在XAML端非常冗长,但它可以在垂直和水平方向上很好地调整大小。
You need to sit down and play with all of the layout controls.  You'll find that each has its own quirks.  For example, a stackpanel stacks items nicely, but doesn't resize the children vertically, but does horizontally.  UniformGrid always tries to maintain an NxN matrix of children.  In my limited experience, I've found that using the Grid is the best all-around layout container.  Although it is incredibly verbose on the XAML end, it resizes nicely both vertically and horizontally.


这篇关于构建没有边框和关闭按钮的窗口的最佳方法,并有一些文本框和按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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