WPF 桌面应用程序布局困境
我想开发我的第一个真正的 WPF 桌面应用程序。距离我上一个使用 .NET 2.0 和 Windows 窗体开发的桌面应用程序已经过去了很长时间。由于我必须开发一个新的桌面应用程序,并且我可以利用 .NET 4.0,所以我真的很想使用 WPF。
我正在阅读一些在线教程和文档来选择正确的方法,但我对新控件有点迷失。
基本上我需要一个面板,在数据网格上方显示一些文本框和标签。 你认为我可以通过gridpanel控制达到这样的结果吗? 谢谢。
I want to develope my first real WPF Desktop Application. It's quite a lot of time since my last desktop application, which was developed with .NET 2.0 and Windows Forms. Since i have to develope a new Desktop Application, and i can take the advantage of .NET 4.0 i would really like to use WPF.
I am reading some online tutorial and documentation to choose the right way to do it, but i am a little lost with the new controls.
Basically i need a panel which show some textboxes and label above a datagrid.
Do you think that i can achieve such a result with gridpanel control ?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 WPF 中,您通常使用几种不同的控件。 控件组合是 WPF 中的一个主要功能,通过了解它并利用它,您将获益匪浅。
当查看你的屏幕时,我将其分为两个主要部分:
- 坎皮·迪·赖塞尔卡
- resultati
对于这两个,我将使用包含两行和一列的网格。
Ricerca 区域可以使用标题在顶部对齐的 DockPanel 和另一个带有填充内容的网格。
……等等,等等。
我最好的建议是让您了解WPF Composition
希望我能有所帮助
In WPF you usually use several different controls. Control composition in WPF is a major feature and you'll gain a lot by knowing it and taking advantage of it.
When looking at your screen i divide it in two major parts:
- campi di ricerca
- resultati
For these two i'd use a Grid with two rows and one column.
The ricerca area could use a DockPanel with the header aligned at the top and aother Grid With Fill contents.
... and so on, so on.
My best advice is for you to learn about WPF Composition
Hope i've helped a little bit
是的,您需要使用网格,具有多个行和列。
请参阅 MSDN 上的示例
Yes, you need to use a Grid, with multiple rows and columns.
See the example on MSDN