Topic Author
Posts: 119
Joined: 30 Jul 2018, 05:03

How should we declare collections in XAML?

12 Jan 2021, 21:26

It seems x:Array isn't implemented (Unknown type 'Array'). Is there another preferred way to create collections in XAML?
User avatar
Site Admin
Posts: 2255
Joined: 22 Dec 2011, 19:20

Re: How should we declare collections in XAML?

15 Jan 2021, 10:52

What kind of items will the collection contain?

You can define your own collection class inheriting from any of the existing ones (List<T>, Noesis.UICollection<T>, Noesis.FreezableCollection<T>,...) and then use your type in xaml.
public class PersonCollection : List<Person> { };
  <local:Person Name="John"/>
We use this to define our StyleInteraction collections for Behaviors and Triggers: ... tml#styles

Who is online

Users browsing this forum: Google [Bot] and 1 guest