You can take a look to
Tree View in Xamarin Forms Android and iOS Devices
Hi how to implement Tree view in Android and iOS through Api Binding. ![86622-image.png][1] [1]: /api/attachments/86622-image.png?platform=QnA
Xamarin
-
JarvanZhang 23,936 Reputation points
2021-04-12T09:56:43.817+00:00 Hi, Bhuwancb99. You could customize a 'TreeView'. First, choose a collection data view such as
CollectionView
to display the title. Then use Xamarin.Community.Toolkit.Expander control to create a expander container.Check the doc: https://learn.microsoft.com/en-us/xamarin/community-toolkit/views/expander
-
Anonymous
2021-04-12T10:27:47.97+00:00 hi @JarvanZhang
i am aslo trying as per suggested by you but how to display 3/4/5 based on records in tree view in expander.
-
Anonymous
2021-04-12T10:40:25.06+00:00 @JarvanZhang ![86887-image.png][1] [1]: /api/attachments/86887-image.png?platform=QnA
-
JarvanZhang 23,936 Reputation points
2021-04-12T10:51:18.617+00:00 If the view has many levels, Expander is not a good idea. Please use a 'TreeView' api instead, you could check the 'TemplateUI' suggested by alessandrocaliaro .
Sign in to comment
-
Alessandro Caliaro 4,181 Reputation points
2021-04-11T12:59:27.43+00:00 -
Anonymous
2021-04-12T05:09:05.46+00:00 i am implemented same code as suggested but always getting error on code .
i am attached my sample code and also suggest can i bind data through API .
can I use content page instead of tabbed page
below is my code
-
Alessandro Caliaro 4,181 Reputation points
2021-04-12T08:33:17.02+00:00 for me it works.
You have to download the TemplateUI project.
Compile it.
Add the TemplateUI.dll to your project and add it as a reference.
Remove from your project the "template" code you have addedd (control directory) and use the TemplateUI Control in your xmalxmlns:controls="clr-namespace:TemplateUI.Controls;assembly=TemplateUI"
-
Anonymous
2021-04-12T09:56:04.417+00:00 i am trying but not working working can you please explain how to add templateUI.dll as a reference or add same dll in all 3 branches like Android and iOS devices.
-
Alessandro Caliaro 4,181 Reputation points
2021-04-12T10:16:44.497+00:00 Do you have create the TemplateUI.dll?
You can reference to it in VS2019
-
Anonymous
2021-04-12T14:06:38.51+00:00 hi @Alessandro Caliaro as per suggestion i am using below steps but i am facing object reference error ![86877-image.png][1] ![86966-image.png][2] ![86908-image.png][3] ![86870-image.png][4] [1]: /api/attachments/86877-image.png?platform=QnA [2]: /api/attachments/86966-image.png?platform=QnA [3]: /api/attachments/86908-image.png?platform=QnA [4]: /api/attachments/86870-image.png?platform=QnA
-
Alessandro Caliaro 4,181 Reputation points
2021-04-12T14:09:37.113+00:00 Have you set TemplateUI.Init() in your App class?
-
Anonymous
2021-04-12T14:13:00.64+00:00 Hi @Alessandro Caliaro it's not allowing me to adding this in App class ![86983-image.png][1] [1]: /api/attachments/86983-image.png?platform=QnA
-
Alessandro Caliaro 4,181 Reputation points
2021-04-12T14:14:40.19+00:00 TemplateUI.TemplateUI.Init();
-
Anonymous
2021-04-12T14:23:43.877+00:00 Hi @Alessandro Caliaro now working and records coming but expand and collapse not working. ![87002-image.png][1] [1]: /api/attachments/87002-image.png?platform=QnA
-
Anonymous
2021-04-12T14:30:07.107+00:00 it's working when double click then expand but 'ts single click it's not working
-
Alessandro Caliaro 4,181 Reputation points
2021-04-12T14:35:53.337+00:00 I don't know.
I think double tap open, and single tap select.
You should take a look to TemplaUI code to understand better (and possibly modify) the behavior.
You have the full source, change the behavior as you likeIf you tap on the left of the yellow icon, you open also with a single tap.
I think there is an "indicator" but it is not visualized. Maybe a bug
Sign in to comment -