如何在 WinForms 中创建自定义 3D 轮播控件?
我有一个 winforms 项目,我想为其开发自定义控件。
我的计划是完全“手工”绘制控件。
它将是一个 3D 轮播,但不像我发现的使用图标和 OpenGL 或其他库将视觉效果渲染到图标上的示例。我将在轮播中绘制每个对象,并在运行时以数学方式渲染这些对象的视觉效果(光照、倾斜等)。
我知道有图书馆可以帮助解决此类问题(但在做出选择时没有足够的经验可供借鉴),因此我正在寻求实现此目标的建议。
请提出建议,使我能够编译和交付我的应用程序,而不会因“第 3 方”依赖项而造成较大的尺寸损失(即我只想发送所需的 dll - 互操作或其他)。
另请注意,我正在寻找一个免费的金钱(0 美元)库,因为这是一个个人项目(目前)。
I have a winforms project that I want to develop a custom control for.
My plan is to draw the control completely "by hand".
It will be a 3d carousel, but not like the examples I have found that use icons and OpenGL or some other library to render visual effects onto icons. I will be drawing each object in the carousel and rendering visual effects (lighting, skew, etc) for those objects mathematically during runtime.
Knowing that there are libraries to help with this sort of thing (but not having sufficient experience to draw from in making a choice), I am seeking suggestions for accomplishing this.
Please make suggestions that will allow me to compile and deliver my application without imposing a large size penalty for the "3rd party" dependency (i.e. I would like to ship only the required dlls - interop or otherwise).
Also note that I am looking for a free as in money ($0) library as this is a personal project (for now).
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我暂时同意科迪·格雷的建议。
我可能会决定稍后选择另一个方向,但到目前为止,这似乎是最简单的路径。
顺便说一句,我在使 WPF 控件与 WinForms 主机应用程序一起使用时遇到问题的原因如下所述:
http://windowsclient.net/learn/integration.aspx
最重要的是:
似乎我要么忽略了这个重要的细节,要么我所剖析的例子未能强调这一点。
无论哪种方式,我希望这可以帮助将来尝试做类似事情的其他人!
HTH,
E
I am going to go with the suggestion by Cody Gray for the moment.
I may decide to go another direction at a later date, but so far this seems to be the simplest path.
BTW, the reason that I have had trouble getting a WPF control to work with a WinForms host application is discussed here:
http://windowsclient.net/learn/integration.aspx
Most importantly:
Seems as if I have either been overlooking this important detail, or the examples which I have been dissecting have failed to emphasize this point.
Either way, I hope that this may help others in the future who may be attempting to do something similar!
HTH,
E