Heterogeneous Data
In most TreeView applications, the displayMemberPath and childItemsPath properties are set to strings that define the name of the property that should be displayed on the nodes and the name of the property that contains child items (the default values for these properties are 'header' and 'items').
In some applications, however, the names of these binding properties depends on the hierarchical level of the data. In these cases, you can use an array of names for either property.
The tree below is bound to a list of 'continent' items, each with a 'countries' member that contains a list of 'country' items with a 'cities' member:
Africa
Algeria
Algiers
Oran
Constantine
Angola
Luanda
Ambriz
Bailundo
Benin
Porto Novo
Cotonou
Parakou
Botswana
Gaborone
Francistown
Molepolole
Asia
Afghanistan
Kabul
Kandahar
Herat
Armenia
Yerevan
Gyumri
Vanadzor
Azerbaijan
Baku
Agjabadi
Astara
Bahrain
Manama
Riffa
Sitra
Europe
Albania
Tirana
Elbasan
Fier
Andorra
Andorra la Vieja
Canillo
Encamp
Austria
Vienna
Salzburg
Graz
Belarus
Minsk
Barysaw
Slutsk
America
Canada
Ottawa
Toronto
Vancouver
United States
Washington
New York
Pittsburgh
Mexico
Mexico City
Acapulco
San Jose
Belize
Belmopan
Dangriga
Belize City
Ocenania
Australia
Canberra
Sydney
Melbourne
New Zealand
Wellington
Christchurch
Auckland
Fiji
Suva
Labasa
Nasinu
Vanuatu
Port Vila
Forari
Etate