Replies: 14 comments 26 replies
-
|
Yep, please let me get back to you with a more complete doc/example in a few days. What i can tell so far: you are the master of the cell here. In MAUI if you create different native views for different purposes inside the same cell and then try to change their size/content/visibility when context changes this all would: Basically what you'd want to: Create a cell and include your UI's inside for different cases and set their content/visibility upon context. DrawnUI recycling goes up to tracking different heights of cells so you dont have a cell already measured for 50pts to be reused (recycled) for an index that needs 100pts height and vice versa. On native we get nice lags when native cells are remeasuring for different content, forcing us to disable recycling completely. And we still see lags when those different templates are switching on Android with DataTemplateSelector. Anyway: You can design the UI in XAML no problem. But no maui bindings on cells, otherwise the data will be updated not when you want, but when the runtime decides to. You could even come up to a situation wher you have some updated on one frame, and some on another, re-measuring a new cell 2 and more times instead of 1. Inside a recycled cells scroll the "ui-thread-focused philosophy" of bindings is creating lags. Android accelerated canvas is rendering your code on a dedicated GPU thread, views adapter sets the new bindingcontext on this thread inside the frame window too, and you'd want to update all properties in 1 pass in code behind (when bindingcontext changes), not with app/runtime switches to UI-thread. |
Beta Was this translation helpful? Give feedback.
-
|
Hey i digged down and found several issues that prevent the needed result. Let me fix this and get back, might take several evenings at first glance. |
Beta Was this translation helpful? Give feedback.
-
|
Here we go: bnSonic/DrawUITest#1 |
Beta Was this translation helpful? Give feedback.
-
|
Hey devenv_bET2Ok8ymv.mp4 |
Beta Was this translation helpful? Give feedback.
-
devenv_9Vpeg057UV.mp4is this okay? for both cases open/close? |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
Pushed. You would also maybe notice ReserveTemplates="10" on stack what this does it pre-creates cells so we dont create then while scrolling when starting with minumum number of cells and do not lag while doing so. |
Beta Was this translation helpful? Give feedback.
-
|
For some lazy scenarios a SkiaDrawer could be used like shown in drawnui demo app, but for a heavy list like this i would handle gestures inside the cell to translate the main view and make optional context controls visible. Don't forget to cache controls too, and make em invis for rendering loop to skip em when "cell is not swiped/closed". |
Beta Was this translation helpful? Give feedback.
-
|
Please update nuget to 1.6.2.6 might be "a bit" smoother |
Beta Was this translation helpful? Give feedback.
-
|
Haha - First Step works! drawui-ios-myswipe.movBut: currently the context Layout is always set to Anyway - I will play around with it a little more (where and how to get the tap for everything I need and check it out in release build on a real device :) I also have to test a List with VERY many, I mean A LOT of Items, like 40k Items or so … I think that's were the LoadMore-Feature kicks in :) but then I might have questions … but on step after the other :D and let me add another BIG THANK YOU for this project and your enthusiasm! This can be a real game changer for us MAUI developer!! |
Beta Was this translation helpful? Give feedback.
-
|
Thanks! It's just the 40_000 items it's not a very common case for me, so.. To handle the scroll to item nb 1_000_001 would need to implement that "sliding window". The scroll doesn't know where to scroll for that item since it wasn't measured, so it would use like an "average height" to if we needed do have a progress bar (optional) and then measure a chunk containing that item and jump there. So it could end up with many measured chunks having unmeasured chunks between them, you see the mess. But anyway when we have our own control "all is doable". |
Beta Was this translation helpful? Give feedback.
-
|
@bnSonic Say, regarding that filter, in case you would try today, i just fouund an issue for resetting itemssource in MeasureVisible case: fix will be in the next nuget. |
Beta Was this translation helpful? Give feedback.
-
|
A follow up question about multiply Layouts in a List: For Example: Imagine a List showing about 7 to 30 Days
And with Appointments: These are complex Borders again where every Appointment has it's own header with Text, Icon, … and a List of additional Information that depends on data. I'm currently thinking to build it up like so:
And then I would use "TheDay.xaml" as Layout for the List/Template In CodeBehind of "TheDay" I would then
Is this a (the?) way to think with DrawnUI? To really build up the complete layout in a BindingContextChanged? If you think this is a good approach my feelings would be better :) |
Beta Was this translation helpful? Give feedback.
-
|
Thanks, would appreciate even more critical feeback!
|
Beta Was this translation helpful? Give feedback.



Uh oh!
There was an error while loading. Please reload this page.
-
Hi :)
I'm just trying to understand this cool idea of DrawnUi.
I like to build a replacement for a CollectionView where I display Data of different types
with ListView / CollectionView I'm doing this with the DataTemplateSelector
The Items are of kind
ObservableCollection<IMyData>And
IMyDatahas an enum likeenum DataType {Group, Data, Action}In the DataTemplateSelector I then can do something like this
now with DrawnUi I see, that
itemis always null.The documentation in the throw states that this is intended I that I could modify the cell on the fly …
Well … How?
If I like to design the template with XAML and I need different layouts for different kind of data - what would be the DrawnUI style do solve this? :)
I haven't found a DataTemplateSelector in the Demo-Code … but then I wasn't sure what to search for …
thanks a lot for anyone who can offer some time to explain that to me
Beta Was this translation helpful? Give feedback.
All reactions