简体   繁体   中英

Question regarding WPf/Silverlight/Windows Phone7 Developemt

I have experience coding in C# (console and Windows Form applications). For something to do in my free time, I've been intending to pick up another language, and have my sights on something thats a little more content rich. However, I'm confused about the following:

  1. Windows Forms are used to develop GUI applications for windows. What is WPF and how is it different from Windows Forms
  2. Does Windows Phone development use C#, or exclusively Silverlight? Or does it just use the .NET framework, and you can use either of the two?

Adding to other answer(s):

  1. WPF uses an XML-based markup called XAML to describe the UI, like HTML does for a web page. The XAML file is paired with a "code-behind" (.cs or .vb) file that is compiled together when the app is built. Adding an XML element to the XAML file is equvalient to declaring an object in the code-behind file. For many classes, you can choose to do one or the other.

  2. Use can use C# or VB.NET language to write Windows Phone apps (although currently only C# is available in the free Visual Studio Express that comes with the Windows phone tools on App Hub). Silverlight is a subset of the .NET Framework, whose classes can be used to write phone apps. You can also use the XNA libraries to develop phone applications.

I HIGHLY recommend Charles Petzolds free ebook for more. He does a great job of explaining this in the first couple chapters: http://charlespetzold.com/phone/index.html

Hope that helps!

Win Forms are a light object oriented wrapper around the basic Win32 GDI primitives.

WPF and Silverlight do their own rendering, don't use GDI and are built on XML-based layout and the MIL .

Windows Phone Development uses Silverlight with C#. The WP7 version of Silverlight runs on a modified version of Silverlight 3, which in itself uses a modified/minified .NET framework. So WP7 development uses all of what you mentioned in question 2.

I can't give a much better answer than @jeffmaphone for question 1, so please look at his response.

Windows Phone 7 uses Silverlight for the UI but the code can be C# or VB. This page of Code Samples for Windows Phone has both but:

In order to build and run Visual Basic samples, you must install additional developer tools. For more information, see Installing Windows Phone Developer Tools.

For more information see the Windows Phone 7 Developer Guide

1) Windows Forms is one method to develop GUI apps for Windows, WPF is another (for Vista, 7 and XP SP2). In general, Windows Forms is great for simple, quick and dirty applications, while WPF works well for more complex and flashy applications.

2) Windows Phone uses Silverlight for non-game applications and XNA for games. In both cases, you can use C# as the logic layer. In other words, C# code decides where to put things in the UI, while Silverlight or XNA are different ways of talking to a display.

Be careful about searching for Silverlight tutorials, because not all of Silverlight is on the phone.

Here are my suggestions:

1) Check this discussion : WPF versus Winforms

2)Generally Windows Phone 7 supports two frameworks for developing applications– Silverlight and XNA. Check MSDN for reference:

The Silverlight and XNA Frameworks for Windows Phone

Features Supported in Silverlight for Windows Phone

PS: One of the best resource for Silverlight development is the official Silverlight web site: http://www.silverlight.net/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM