I want to create a ListView that will contain very customized cells - customized means that they have: at least 6 labels, 1 image, 1 button and another "thing" described below. My current solution is this:
1. I've created custom viewCell class
2. Added a Grid to contain all UI's elements (grid is 2 rows by 12 columns)
3. The first row contains all UI's elements
4. The second rows spans on all 12 columns and contains my own TimeLineSlider- the "thing" (its just to show particular information to the user). The second row is around 40 in size
5. I have created a class (lets call it PersonClass) to hold information that goes to the UI's elements (so I have string FirstName, string LastName)
6. I have created a DataTemplate to bind those elements with elements from the PersonClass class.
7. The TimeLineSlider is written in AbsoluteLayout and I am getting it by calling MySlider.GetSlider().
And now the issues:
I can wrap my AbsoluteLayout of TimeLineSlider into ContentView or a Grid and return it. Also, for each person I want to have different slider, so in the class PersonClass I also have a field type of ContentView or a Grid - I tried both.
When using ContentView:
1. The slider is displayed on the screen, if the list contains 2 elements, then I will see 2 sliders - as expected. However they are under the list... so I have 2 normal cells with information from other PersonClass fields, but those 2 sliders are going to be under the list. When clicking on an item, I can see that slider is also blinking (like when u click) and then it disappears...
2. this is the code for binding:
var slider = new ContentView(); slider.SetBinding(ContentView.ContentProperty, "Slider");
When using Grid:
1. The slider does not show at all but I can see in debugger that the list is filled with those sliders so they are being generated.
2. When using the grid, you can see how the structure looks: ListView->Cell->Grid->Rows/Columns->Grid->AbsoluteLayout....
3. this is the code for binging:
var slider = new Grid(); slider.SetBinding(Grid.BindingContextProperty, "Slider");
Can I please receive some help with this? Both: fix those issues, choose the correct Grid/ContentView and of course suggest another way of doing the whole thing.