animas3D

Hello there,

I have been trying to develop a graphics program in Visual Basic 2005 (Express edition) for about a month now. Basically, I am using the tools that there happen to be in GDI+. I am certainly no expert, but am trying my best.

Tonight, I dipped into the help system to get some information, and noticed something called Windows Presentation foundation. I did not read it in depth, but noticed that there were some interesting tools there, such as for animation and 3D transformations, etc. I did not notice any code samples for Visual Basic, only something called XAML and C#.

Please excuse my ignorance, but what exactly is this WPF Can I access it with Visual Basic Since I am still at the beginning of this process, would you suggest that I do not design a graphics program with Visual Basic, but rather learn C# instead Or should I use XAML What is XAML anyway

Sorry for all the questions. Thank you for helping.

Joe.



Re: Windows Presentation Foundation (WPF) Question about WPF

Yi-Lun Luo - MSFT

Hello, please have a look at Introduction to Windows Presentation Foundation (WPF is its abbreviation). Also, topics under Graphics and Multimedia might be of your interests.

XAML means Extensible Application Markup Language. Have a look at XAML Overview. You can do without XAML, but XAML will make your life much easier.

Yes, you can use Visual Basic. But unfortunately, most examples about graphics are written in C#. Try to search samples written in VB on the web. And, of course, having some knowledge about C# won¡¯t be bad. You can also try to translate samples written in C# to VB.






Re: Windows Presentation Foundation (WPF) Question about WPF

Walt Ritscher

You can use Visual Basic to program any type of .NET application(Windows forms, ASP.NET, ADO, WPF, WCF and hundreds more). Many of the teams inside Microsoft are diligent about producing example code for VB and C#. There are a few teams inside Microsoft however that seemed surprised to find out that there are developers who write code in any language other than C#. For the record, there are plenty of programmers out there writing in managed C++ and VB.

XAML is a brand new programming language. It is primary used with Windows Presentation Foundation (WPF) and Windows Workflow Foundation(WF). You can create a WPF app with only VB code, or only XAML. More commonly you will use both XAML and VB to create your WPF application. XAML is an XML representation of your UI elements. There is a XAML compiler that converts the XAML to a more computer friendly version just like the VB compiler turns your VB code into IL(Intermediate Language).

Let's look at your other questions. What is WPF Should you learn WPF or continue with GDI

GDI is an old technology that has been enhanced during its long lifetime. WPF is the newest graphics engine to emerge from Microsoft. You can do things with WPF that are difficult or impossible to create with GDI code. If you enjoy graphics programming I encourage you to learn WPF.

Resources

Tim Sneath blog

Rob Relyea blog

My Wpfwonderland blog

WPF blog

Walt Ritscher

wpfwonderland.wordpress.com

Learn WPF today: Mastering WPF course






Re: Windows Presentation Foundation (WPF) Question about WPF

animas3D

Thank you very much for your wisdom. It is very enlightening.

From what I can see, and correct me if I am wrong, It is fine to stick with VB as a development environment, but it would be beneficial to learn XAML as well. (I presume that XAML is pronounced Zamill ) Also, I gather from your post that WPF is the new graphics engine to replace GDI, and is not only used for user interface type of things but for all graphics routines as well such as those needed for programming a graphics/animation program.

My computer is pretty modern, but I got it before Vista came out. Do you suggest running Vista to do development with WPF Or is it fine to stick with XP

I am running Visual Basic v8, should I wait a while until the lastest VB comes out (Orca )

In any case, I will certainly examine all the links you have provided me.

Thanks again,

Joe.





Re: Windows Presentation Foundation (WPF) Question about WPF

Yi-Lun Luo - MSFT

You can use Windows XP SP2. But first you need to download and install .NET Framework 3.0 if you haven¡¯t done so. Also you may want to download Visual Studio 2005 extensions for .NET Framework 3.0 (CTP). This is an extension to Visual Studio 2005.






Re: Windows Presentation Foundation (WPF) Question about WPF

animas3D

Thank you very much, I will install those things you mentioned. If you would, I have one other question. I was reading some of the links you provided about WPF, and noticed that, although there were routines for drawing bezier curves, there were none for drawing cardinal splines such as the DrawCurve method in GDI+. I would like to use cardinal splines instead of bezier curves. I hope it will be possible in WPF.

If not, can I continue to use the Cardinal Spline DrawCurve method in GDI+ and mix it with WPF

Joe.





Re: Windows Presentation Foundation (WPF) Question about WPF

Yi-Lun Luo - MSFT

I think you can use PathGeometry. You can use many kinds of segments. Have a look at here, especially the ¡°Path Geometries¡± topic.