ASP.NET自定义UI生成器 [英] ASP.NET Custom UI Builder

查看:98
本文介绍了ASP.NET自定义UI生成器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要求用户能够设计自己的UI(用户具有一组可用的控件,并且用户可以选择一个控件并开始将控件添加到页面中.

现在,我需要一种机制,可以在其中显示用户添加的控件,然后开始添加控件及其在页面上的位置.为了使用户能够理解用户添加的控件,我应该能够在网格上显示控件层次结构?控制板 ? iframe?我不知道,它看起来很接近页面上的实际层次结构和顺序.

然后,我将读取控件位置并生成xml,然后使用XSLT呈现页面.

现在,我需要一些想法,说明如何将用户刚刚添加到网格上的控件显示在网格上?或其他某种画布类型,使其看起来更接近页面的布局?

有什么建议吗?

更清楚..

可以说该页面有一个下拉列表,其中包含用户可以添加的所有允许控件的列表..他选择了它..也许是在面板中,或者这是我停留在什么地方和方式上的地方...我显示了添加的控件和然后用户选择他想添加的另一个控件,位于旁边的top,right,left之前的控件上.

--------------------------------------------------
标签文本框按钮
标签文本框
标签文本框标签下拉标签文本框
按钮
--------------------------------------------------

这样的东西?

顺便说一句,这些控件不仅仅是文字或显示用户到目前为止已按相应顺序添加的控件.

然后,我将读取所有控件的相对位置,并将其转换为XML,然后XSLT将其转换并呈现​​为页面.

I have a requirement that the User be able to design his own UI (user has a set of Controls available and the user can select a control and start adding the controls to the page.

Now I need a mechanism where I can show what control the user added to begin with and start adding the controls and their position on the page. For the user to be able to understand the controls the user has added, I should be able to show the control hierarchy on a grid ? panel ? iframe ? I dont know , which looks close to the actual hierarchy and order on the page.

I would then read the control position and generate a xml and render the page using XSLT.

Now I need some ideas on how I would show the controls the user just added to the page on a grid ? or some other canvas type so that it looks close to the layout of a page ?

Any suggestions ?

To be even more clear ..

Lets say the page has a drop down with the list of all allowable controls the user can add.. he selects it ..maybe in a panel or this is where I am stuck on what and how ... I show the control added and then the user selects another control he wants to add , either right beside , top , right , left to the previously added control.

--------------------------------------------------
Label TextBox Button
Label TextBox
Label TextBox Label DropDown Label TextBox
Button
--------------------------------------------------

something like this ?

Btw those aren''t controls just a literal or something showing the controls the user has added in the respective order so far.

I would then read all the controls their relative positioning and transform it into an XML which would then be transformed and rendered as a page by XSLT.

推荐答案

这样做非常棘手,您可以(使用大量jQuery)从工具栏拖放控件",并捕获添加它们的坐标.要了解如何执行此操作,为什么不看看 jQuery UI [
While it would be fairly tricky to do, you could (using a liberal dose of jQuery), drag and drop the "controls" from a toolbar and capture the co-ordinates that you added them at. To get an idea of how to do this, why not take a look at the jQuery UI[^] to get an idea of how you could do this using their interactions.


这篇关于ASP.NET自定义UI生成器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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