Defining New Properties

XAML is primarily focused on instantiating existing classes and setting values of their predefined properties. Two elements in XAML2009—x:Members and the corresponding x:Property—enable the definition of additional properties directly inside XAML. This functionality doesn’t apply to the topics in this book, however. You can see it used in Windows Workflow Foundation XAML, as in the following example:

<Activity x:Class="ActivityLibrary1.Activity1" ...>  <x:Members>     <x:Property Name="argument1" Type="InArgument(x:Int32)"/>     <x:Property Name="argument2" Type="OutArgument(x:String)"/>   </x:Members> ...</Activity>

Get XAML Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.