These are chat archives for AvaloniaUI/Avalonia

15th
May 2016
Ben Pye
@benpye
May 15 2016 05:19
I'm trying to work out what my best fit is, I'm trying to build something not dissimilar to a flow chart editor (not quite but closest comparison I can think of in UX), I would like to use native controls for the bits around the editor, however, would Avalonia be suitable for building the editor control, or would I better going straight to something like SkiaSharp?
With Skia I would have to wrap everything myself it seems as there is no sort of view hierarchy, so that'd have to be added to get zoom, pan, translation and the like
Steven Kirk
@grokys
May 15 2016 06:33
hmm, difficult to say really. what will you be using for the native controls?
danwalmsley
@danwalmsley
May 15 2016 11:10
@benpye might be a good idea to look how Core2d achieves the same thing
Nikita Tsukanov
@kekekeks
May 15 2016 11:11
I also was thinking about embedded mode for complex controls
with complex rendering, I think
Since Avalonia isn't really useful for mobile at current point
Mainly because of text input
Wiesław Šoltés
@wieslawsoltes
May 15 2016 11:23

With Skia I would have to wrap everything myself it seems as there is no sort of view hierarchy, so that'd have to be added to get zoom, pan, translation and the like

@benpye You can have a look and my PanAndZoom control for Avalonia https://github.com/wieslawsoltes/MatrixPanAndZoomDemo

There is one issue with using native Avalonia controls, the hit-testing does not take into account the transforms, in my app Core2D I use custom drawing and custom hit-testing.
Wiesław Šoltés
@wieslawsoltes
May 15 2016 11:33
Demo video showing my Core2D editor running on top of Avalonia :
https://youtu.be/aegz0Rx9YRw
danwalmsley
@danwalmsley
May 15 2016 13:48
@wieslawsoltes hit testing not taking into account transforms, is that something we need to fix?
Wiesław Šoltés
@wieslawsoltes
May 15 2016 13:53
Yes AvaloniaUI/Avalonia#433
Steven Kirk
@grokys
May 15 2016 15:35
Yeah I'm not sure how to fix that without building up geometry for the whole window
Ben Pye
@benpye
May 15 2016 15:47
Well native would be WPF, or Xamarin really. But yeah Core2D looks similar
Matthijs ter Woord
@mterwoord
May 15 2016 15:50
so avalonia is kind of like an application host?
providing all kinds of base infrastructure?
danwalmsley
@danwalmsley
May 15 2016 16:00
@mterwoord @benpye there are no native controls in avalonia, they are all lookless controls based upon a rendering layer which is can run on many different platforms
so Avalonias buttons are not native buttons
they are not mac buttons, or windows buttons
but they can be styled to make them look native
Steven Kirk
@grokys
May 15 2016 16:16
To be fair, wpf isn't native either
Darnell WIlliams
@ImaBrokeDude_twitter
May 15 2016 16:20
Yep but it would be nice to provide native styles
Ben Pye
@benpye
May 15 2016 16:35
@danwalmsley I am aware, I was kinda following up on a question I asked earlier. I was considering using Avalonia for a specific non native control to be used with other UI elements. Seems that in its current t state Avalonia doesn't really help me though, transforms not working exactly as they should being a big part of that.
Nikita Tsukanov
@kekekeks
May 15 2016 18:29
I thing that Xamarin.Forms, Eto.Forms and Avalonia shoud use the same XAML engine
So one would be able to mix controls from them
Darnell Williams
@Seeker1437
May 15 2016 19:10
I think if not the same engine the same API
We have some different thing between them
Idk about mixing though, wouldn't that be hard
Each on has its own application life cycle and threading and service registration.
Nikita Tsukanov
@kekekeks
May 15 2016 19:14
Threading shouldn't be an issue
Since it's using underlying OS mechanisms for that