These are chat archives for AvaloniaUI/Avalonia

17th
Jan 2019
MonkAlex
@MonkAlex
Jan 17 05:19
Hmm, can i bind it to child visibility? Now i use button with command (and CanExecute for isenabled and isvisible) and model without property to bind.
MonkAlex
@MonkAlex
Jan 17 05:34
#2243 u recommend DynamicData, but not any examples show, how to do IReactiveDerivedList.Reset() for DynamicData -(
Taras Kovtun
@grimcoder
Jan 17 06:57
Sorry for bothering but I was not able to find a reasonable example of using DevTools (I expect this is something like Developer Tools in Chrome) Is this already supported?
Nikita Tsukanov
@kekekeks
Jan 17 07:06
this.AttachDevTools();
F12
Taras Kovtun
@grimcoder
Jan 17 07:09
Thanks. This is a great tool, indeed, but it does not allow to modify prop values.
Nikita Tsukanov
@kekekeks
Jan 17 07:24
What would you expect from value modification via devtools? int/string values or arbitrary stuff you can do in XAML (e. g. new {Binding } and other markup extensions
Historically XAML frameworks solve "live edit" via previewer and use devtools for inspection
BTW, it seems we really need a standalone previewer version
AvalonStudio is far from being stable and we don't have any other previewer tool for Linux/OSX
Taras Kovtun
@grimcoder
Jan 17 07:28
@kekekeks Historically any complex XAML design even using design-time DataContext injection was not supported neither in WPF nor in Silverlight. I cannot judge for Xamarin. So my best bet was to use XAML Viewer of any kind expecially when I am trying to move items and change font size etc... to get a pixel perfect design
Nikita Tsukanov
@kekekeks
Jan 17 07:29
We are trying to solve this issue by starting your entire app in designer process
Previewer calls BuildAvaloniaApp from the file with your entry point
And reconfigures windowing platform
So it shouldn't be any different from the running app
Taras Kovtun
@grimcoder
Jan 17 07:30
and rendering happens in the designer window?
that would be cool
Nikita Tsukanov
@kekekeks
Jan 17 07:30
In case of xplat previewer protocol
Rendering happens to an offscreen surface
That is being serialized and sent via TCP to previewer client
For visual studio we are still using the old way
Of creating a window with WM_CHILD flag
And reparanting it to visual studio window
You can even click on previewed window
And it will handle input events
Jeremy Koritzinsky
@jkoritzinsky
Jan 17 07:50
@kekekeks I've hooked up the input events for RemoteWidget on a local branch. I can send out a PR for it if you want.
We could also probably port that over to Avalonia.Ide and switch over the WPF previewer if we can get performance where we want.
Nikita Tsukanov
@kekekeks
Jan 17 07:52
I think input events were implemented in AS at some point
PR would be nice though
Regarding performance
We probably need to use a shared memory mapped file for transferring frames
BSON serialization seems to be too slow
Another problem would be next frame signaling
Again, TCP might introduce unwanted delays there
Unfortunately, named mutexes aren't supported on *nix
Nikita Tsukanov
@kekekeks
Jan 17 08:06
@jkoritzinsky Do you know if interlocked operations work with shared memory?
According to SO it does
So we could implement an inter-process swap-chain using memory mapped files, I think
In case of WPF the reader side would hook to CompositionTargetRendering and check for new frames
For our remote widget to work with this approach properly we would need AvaloniaUI/Avalonia#2185
Which is currently blocked by AvaloniaUI/Avalonia#2244
Taras Kovtun
@grimcoder
Jan 17 08:19
Is there a good example how to embed/use oft fonts (or any other) ?
ahopper
@ahopper
Jan 17 08:25
@kekekeks would implementing IsOpaque for #2185 sidestep #2244 for many uses?
Nikita Tsukanov
@kekekeks
Jan 17 08:39
It would basically require to draw such visuals without a backing layer
Steven Kirk
@grokys
Jan 17 10:49
@ahopper just going through old PRs trying to get them up-to-date and merged etc. do you want me to find a solution for AvaloniaUI/Avalonia#2067 ?
am i ok to push to your branch if so?
ahopper
@ahopper
Jan 17 10:53
fine by me, I got stuck at getting something to signal layout change, @kekekeks had some ideas
Steven Kirk
@grokys
Jan 17 10:53
yeah, trying to find that conversation... do you have a link?
gitter search sucks
ahopper
@ahopper
Jan 17 10:56
searching IRenderRoot works 16th dec
Steven Kirk
@grokys
Jan 17 10:56
thanks!
ahopper
@ahopper
Jan 17 14:45
great
Jeremy Koritzinsky
@jkoritzinsky
Jan 17 16:00
Atomic operations should work with shared memory.
Nikita Tsukanov
@kekekeks
Jan 17 17:12
We'll have to create some naming scheme for cleaning up after crashed/killed apps
Like {DIR}/avalonia-previewer-session.{SEQ}.{PID}
So it would be possible to detect stale files by checking if PID is still alive
It would be nice to use sendfd/recvfd to pass file descriptors on Linux/OSX, but that would be too complicated
Benedikt Schroeder
@Gillibald
Jan 17 22:26
I will write my own HarfBuzz binding to better understand how the API should look like and how to use it properly. I want to have a binding that let's you use the library as it should be and not just some box you throw your text in and hope things get right. The good thing is Skia and HarfBuzz don't dependent on each other. There is a reason there are other bindings out there but all seem to have issues.
Steven Kirk
@grokys
Jan 17 23:43
@Gillibald so your problem with HarfBuzz is the bindings?
can you not just improve the bindings?
my worry about writing our own HarfBuzz is maintainership