实现MS Access样式“关系”GUI [英] Implementing MS Access style 'relationships' GUI

查看:72
本文介绍了实现MS Access样式“关系”GUI的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道这种UI风格的正确名称是什么。在MS Access中,关系工具将数据库表显示为可以与行链接的可移动框。它与Video和一些音频应用程序相同 - 可移动的盒子,包含可以以有意义的方式连接在一起的文本行。



如何我可以使用Visual Studio 2008和C#在.NET中创建类似的东西吗?我之前从未创建过自己的控件。

是否可以通过列表框?

或者必须使用用户控件

i使用过列表框和标签数组现在我只需要在拖放项目之间绘制线条



点击这里例如

解决方案

正如Slacker所说,搜索自定义控件。



-



如果您的需求很简单,您可以尝试使用现有控件创建一些模板子窗口,而不是处理油漆事件。



让我们说,每个盒子可能是这样的:

 _______________________ 
| |
|标题|
| _______________________ |
| |
| *文字|
| |
| []其他|
| | ---段落::来源|
| | --- Info ::图片|
| |
| _______________________ |





该框可以是任何窗口容器,也可以是MDI子窗口,所以你可以移动,拥有标题,最大化,最小化或关闭窗口(你甚至可以用你喜欢的东西替换这些事件,例如:最小化只显示标题栏而不是最小化或关闭事件以删除所有连接)并移动事件所以。



对于Items部分,您可以使用Tree View Control之类的东西。



现在,对于线条,您可以将其绘制在一个停留在所有窗口之上的方式或使用具有透明背景的控件并在其上绘制线条并将其保持在前景上,您最终将为其创建自定义控件。或者您可以用另一种方式来表示链接指示符,例如将Item的图标更改为表示链接或目标窗口图标的内容,并在树视图中的该项目的子项目上显示链接目标,如上面的例子。


这不是控制!!



这就是一大堆工具集。它就像UML类图。要创建这样的东西,您需要创建一个像Visio这样的整个工具。这是一个很高的要求!



如果目的是创建这样的图表,您可以使用MS Visio并创建类图。如果您使用的是Visual Studio 2010,则可以追溯创建代码的类图。



- Milind


我们可以吗?借助此链接实现上述功能

WPF Diagram设计师 - 第3部分 [ ^ ]

I have no idea what the correct name for this UI style is. In MS Access the ''relationships'' tool shows the db tables as little movable boxes that can be linked with lines. It''s the same with Video and a few audio apps - boxes that are movable, containing lines of text that can be joined together in a meaningful way.

How could I create a similar thing in .NET using Visual Studio 2008 and C#? I''ve never created my own controls before.
Is it possible via listbox??
or have to use user control
i have used listbox and label arrays now i just need to draw line betwen drag and drop item

click here for example

解决方案

As Slacker said, search for custom controls.

-

If your needs are simple you can try doing something like creating some "template child windows" using existing controls instead of handling paint events.

Let''s say, each "box" could be like this:

 _______________________
|                       |
|        Title          |
|_______________________|
|                       |
|  * Text               |
|                       |
| [] Other              |
| |---Paragraph::Source |
| |---Info::Images      |
|                       |
|_______________________|



The box can be any "window container", also it can be a MDI Child Window, so you can move, have a title, maximize, minimize or close the window (you can even replace these events with something you like, for example: minimize would show only title bar instead of minimizing or close event to remove all connections) and move events and so.

For the Items part you could use something like a Tree View Control.

Now, for the lines you could paint it in a way it stays above all windows or use a control with transparent background and draw the line on it and keep it on foreground, you''ll end up creating a custom control for it. Or you can think in another way of representing the "linking indicator" like changing the icon of Item to something representing the link or the target window icon and show the "link target" on child items of that Item inside the Tree View like in the example above.


Thats not control !!

Thats whole bunch of toolset. It like UML class diagram. To create such thing, you need to create a whole tool like Visio. And thats a tall order !

If the aim is to create such diagram, you can use MS Visio and create class diagram. If you are using Visual Studio 2010, you can create a class diagram of your code retrospectively.

- Milind


Can we implement the above thing with the help of this link
WPF Diagram Designer - Part 3[^]


这篇关于实现MS Access样式“关系”GUI的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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