These are chat archives for AvaloniaUI/Avalonia

11th
Jun 2017
Steven Kirk
@grokys
Jun 11 2017 00:07
GODDAMMIT VISUAL STUDIO
how the fuck am i supposed to get anything done?
Steven Kirk
@grokys
Jun 11 2017 00:36
ok, that's it, i give in
i'm not sure i can continue working on avalonia until visual studio gets fixed
Joel Day
@joelday
Jun 11 2017 04:31
@kekekeks Making good progress!
I’ve got my TopLevel impl, etc. working. Only thing is there doesn’t seem to be any visual tree. Basically, nothing has any visual children, so the renderer doesn’t render the views.
Joel Day
@joelday
Jun 11 2017 04:42
There’s no ContentPresenter
Nikita Tsukanov
@kekekeks
Jun 11 2017 07:06

Only thing is there doesn’t seem to be any visual tree.

Well, logical/visual tree separation comes into play when you start adding a bit more complex controls

ListBox, for example
Even button consists of ContentPresenter wrapped inside Border
Matthijs ter Woord
@mterwoord
Jun 11 2017 09:22
Shoot. Having issues with my framework and netstandard. :|
Matthijs ter Woord
@mterwoord
Jun 11 2017 09:42
for the avaloniavs extension to work, i need to double-target right? (.net standard and .net 4.6.2)
Steven Kirk
@grokys
Jun 11 2017 11:38
ok @kekekeks i've fixed those tests on extract-layout-manager - the problem turned out to be really simple after some sleep
previously there was no LayoutManager registered so doing a root.Measure(100, 100) essentially fixed its size to that
now there is a layoutmanager on the root control, which will carry out a measure of the root using MaxClientSize
causing the root control to no longer have the size we initially measured it with
Steven Kirk
@grokys
Jun 11 2017 14:57
also i don't think your layout stuff in #1016 is quite right - i'm going to try and work out how to do it properly
Joel Day
@joelday
Jun 11 2017 15:20
@kekekeks I assume it’s just the elements I’ve added then? I’ve done TopLevel -> UserControl subclass -> Grid -> Rectangle
all manually constructed
Quick additional question: How are the Xaml files compiled if you’re doing netstandard?
Matthijs ter Woord
@mterwoord
Jun 11 2017 15:22
I doubt they're compiled....
Steven Kirk
@grokys
Jun 11 2017 15:53
yeah, they're not compiled, they're parsed at runtime
i'm hoping this might be a possibility in future though: cwensley/Portable.Xaml#41
Joel Day
@joelday
Jun 11 2017 15:55
Okay, cool. :)
Joel Day
@joelday
Jun 11 2017 17:11
@kekekeks Hrm. I set TopLevel’s Content to a new Button, but my DrawingContext still doesn’t go further than just the initial PushOpacity and PushClip for the TopLevel control.
InvalidateVisual on TopLevel later on does the same thing. InvalidateVisual on the Button doesn’t result in anything happening.
Joel Day
@joelday
Jun 11 2017 17:42
Got it figured out. Setting up some ContentPresenters via Template manually.
Joel Day
@joelday
Jun 11 2017 18:03
Hrm, never seeing any of the drawing calls, just opacity and clipping, though