What’s In This Chapter?
Wrox.com Code Downloads for This Chapter
The wrox.com code downloads for this chapter are found at www.wrox.com/go/professionalcsharp6 on the Download Code tab. The code for this chapter is divided into the following major examples, for both WPF and Universal Windows apps:
When you’re writing a .NET application, usually C# is not the only syntax you need to know. If you write Universal Windows apps, Windows desktop applications using Windows Presentation Foundation (WPF), or workflows with Windows Workflow Foundation (WF); create XPS documents, or write Silverlight apps, you also need XAML. XAML (eXtensible Application Markup Language) is a declarative XML syntax that’s usually needed with these applications. This chapter describes the syntax of XAML and the extensibility mechanisms that are available with this markup language. The chapter describes the differences between XAML in WPF applications and Windows apps using the Universal Windows Platform (UWP).
All that can be done with XAML can also be done with C#—so why is there a need for XAML? XAML is typically used to describe objects and their properties, and this is possible in a deep hierarchy. For example, a Window control contains a Grid control; the Grid control contains a StackPanel