These are chat archives for AvaloniaUI/Avalonia

8th
Nov 2016
Steven Kirk
@grokys
Nov 08 2016 11:46
theoretically, yeah! (i suspect in practise it might be more difficult though ;) )
Darnell Williams
@Seeker1437
Nov 08 2016 12:59
I was thinking maybe a layered event.
If that is the correct... thing
Okay simply an event with a callback.
I wish there were extension events
danwalmsley
@danwalmsley
Nov 08 2016 16:51
@grokys iv opened PR #799 with failing unit test for carousel, if you still think that test is incorrect
Might need some help getting started on the fixes we were discussing yesterday
Steven Kirk
@grokys
Nov 08 2016 16:52
yeah, i think that should be the outcome
though quite possibly it will have unforseen effects - we might have to iterate on it a bit
danwalmsley
@danwalmsley
Nov 08 2016 16:59
ok so first thing I need to so is set the logical children of the carousel? whenever items are added or removed from it?
Steven Kirk
@grokys
Nov 08 2016 17:00
yeah, though this is something that affects more that Carousel - the same thing needs to happen for ItemsControl
danwalmsley
@danwalmsley
Nov 08 2016 17:00
ah ok so probably fix might be a common one
Steven Kirk
@grokys
Nov 08 2016 17:01
yeah
bascially any items control that doesn't have a typed ItemContainerGenerator
danwalmsley
@danwalmsley
Nov 08 2016 17:01
probably here is where I need to logical children?
i mean here:
Steven Kirk
@grokys
Nov 08 2016 17:02
that's one place yeah - that handles the case where there are controls in the Items collection
the other scenario is where there are non-controls in the Items collection - in that case, the controls generated via data templates need to get added as logical children as they're created
there's also the fact that the list can be virtualized to consider :/
danwalmsley
@danwalmsley
Nov 08 2016 17:05
perhaps I can do the PR and fix this for non-virtualized ones first
Steven Kirk
@grokys
Nov 08 2016 17:05
but tbh virtualization with non-typed itemcontainergenerators isn't really tested
danwalmsley
@danwalmsley
Nov 08 2016 17:05
then hopefully fix it for virtualized ones after...
Steven Kirk
@grokys
Nov 08 2016 17:05
yeah
danwalmsley
@danwalmsley
Nov 08 2016 17:05
i think it will get a lot more complicated otherwise ;)
Steven Kirk
@grokys
Nov 08 2016 17:05
yeah...
danwalmsley
@danwalmsley
Nov 08 2016 17:05
the other scenario is where there are non-controls in the Items collection - in that case, the controls generated via data templates need to get added as logical children as they're created
can I just do item as IControl
and see if its null to test if I need to find the materialized version or not?
Steven Kirk
@grokys
Nov 08 2016 17:08
i'd advise looking through a bunch of unit tests first, to understand what the behavior is currently
we might want to change that behavior
danwalmsley
@danwalmsley
Nov 08 2016 17:09
ok got to drive home, but will try and look at it this evening.
Steven Kirk
@grokys
Nov 08 2016 17:10
great! good luck! this stuff is quite in-depth
nictaylr
@nictaylr
Nov 08 2016 23:43
how to load embedded font? for example, i want to use an embedded Roboto TTF in my Avalonia app
thanks