开发者

How can I create a custom 3D carousel control in WinForms?

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 开发者_C百科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).


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:

In addition, you will need to modify the project file because the Windows Application does not what to do with the XAML file. You will need to open the project file (.csproj, .vbproj, etc.) in an editor like Notepad and then scroll to the bottom. You will see the following line:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

You will need to copy this line and paste it just below the above line and then change "CSharp" to "WinFX" so that the two lines look like:

<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />

<Import Project="$(MSBuildBinPath)\Microsoft.WinFx.targets" />

Now save this file and reload the project using VS and run the application.

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜