简体   繁体   English

Visual Studio WPF-QT设计器,例如网格布局

[英]Visual Studio WPF - QT Designer like grid layout

Is there any way to layout grids in VS like in QT Designer? 有没有办法像QT Designer中那样在VS中布局网格? Like dragging and dropping in new elements, each automatically confined in its own cell, automatically alligned to the row / column the got dropped in etc.? 就像拖放新元素一样,每个元素都自动限制在自己的单元格中,自动分配到放置的行/列等。

I see how I can achieve the same layouts like in QT in the end by manually specifing a bunch of column and row definitions, and additionally specifing by hand the positioning of each element in each cell, but it is like ten times the work it takes to layout the elements in QT designer and I cannot imagine VS being this bad in this aspect. 我看到了如何通过手动指定一堆列和行定义以及手动指定每个元素在每个单元格中的位置来最终实现与QT相同的布局,但这就像完成工作的十倍一样在QT设计器中布局元素,我无法想象VS在这方面有这么糟糕。

To give an example: 举个例子: QT网格 A grid like this, I can drag and drop together in QT in a matter of 2 minutes, with automatic adjusting column width, empty cells etc. In WPF, a uniform grid gets close to what I need, but it does not permit for empty cells (ok, I can place an empty label but thats kind of bad style), and the row widths are uniform, which does not work for me. 这样的网格,我可以在2分钟内在QT中拖放在一起,并自动调整列宽,空单元格等。在WPF中,统一的网格接近我需要的网格,但不允许空单元格(好的,我可以放置一个空标签,但那有点不好样式),并且行宽是统一的,这对我不起作用。

Write XAML directly, or if you must then use Blend. 直接编写XAML,或者如果必须使用Blend,则编写XAML。

The VS designer has always been garbage, i for one do not use any graphical designer; VS设计器一直都是垃圾,我不使用任何图形设计器。 there simply is no need for that if you have clean markup like XAML and don't need to write some spaghetti code that imperatively creates the view. 如果您拥有像XAML这样的干净标记并且不需要编写某些命令式创建视图的意大利面条代码,则根本不需要这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM