XamlType customerType = schemaContext.GetXamlType(typeof(Customer)); IEnumerablemembers = customerType.GetAllMembers(); foreach (XamlMember member in members) { Console.WriteLine(member.Name); }
XamlSchemaContext schemaContext = new XamlSchemaContext(); IEnumerableThis code retrieves a collection containing all the members defined in all XAML types in the schema context, including attached properties and events, and prints their names to the console. Package/Library: System.Xaml.dll, part of .NET Framework.allMembers = schemaContext.GetAllXamlTypes().SelectMany(t => t.GetAllMembers()); foreach (XamlMember member in allMembers) { Console.WriteLine(member.Name); }