These are chat archives for AvaloniaUI/Avalonia

7th
Aug 2016
Gutemberg Ribeiro
@galvesribeiro
Aug 07 2016 01:06 UTC
@jameswalmsley hey yes, I had Skia compiled to ARM working on the device
however I never moved forward with Avalonia... it didn't worked there by that time and I had a very short time window to deliver the project
so we switched out to port Chrome(which uses Skia) and Node.js to our device
Nelson Carrillo
@nc4rrillo
Aug 07 2016 01:26 UTC
resizing windows is so whacky with gtk and cairo backends
Nelson Carrillo
@nc4rrillo
Aug 07 2016 01:42 UTC
Okay interesting, same code that fixes resizing breaks popup sizing :'D
James Walmsley
@jameswalmsley
Aug 07 2016 10:03 UTC
@galvesribeiro I also have an embedded project coming up, and was thinking about Avalonia for that. So I'm really interested to get this running on Linux first with a Gtk window or similar, and later with a frame-buffer on an ARM based linux.
When using Skia in that way, with a framebuffer target, can it make use of GPU acceleration with Skia?
Darnell Williams
@Seeker1437
Aug 07 2016 11:33 UTC
@jameswalmsley I can help out with that :D
@galvesribeiro and I worked closely together to build the platform code for Avalonia x3
Errm on his embedded system*
danwalmsley
@danwalmsley
Aug 07 2016 11:50 UTC
@Seeker1437 we got skiasharp working for Ubuntu, just the plumbing into Avalonia we didn't get time to work that one out
Nelson Carrillo
@nc4rrillo
Aug 07 2016 11:50 UTC
:)
danwalmsley
@danwalmsley
Aug 07 2016 11:57 UTC
@Seeker1437, @jameswalmsley says he will be around in a few hours, and looking at this again, maybe you will be around later on then?
Nelson Carrillo
@nc4rrillo
Aug 07 2016 16:20 UTC
so Cairo scales images like crap when scaling down for some reason
causing Menu icons to look like crap :S
Nelson Carrillo
@nc4rrillo
Aug 07 2016 16:39 UTC
OK, so using the resize method on the GDK pixbuf yields better results :-)
Gutemberg Ribeiro
@galvesribeiro
Aug 07 2016 16:48 UTC
@jameswalmsley skia itself worked perfectly on our arm device
I disabled the gpu accel since the device doesn have but u can leave it enabled in the build
Our device has only framebuffer
It worked pretty well
The big problem was the complexity to plug into another platform on avalonia and we didnt had time to bang heads
So I dropped it in favor of chrome
Chrome core I mean
Steven Kirk
@grokys
Aug 07 2016 17:38 UTC
@galvesribeiro even though that's a bit of a disappointment, it was probably the right choice
i think avalonia is still probably too immature at the moment
Gutemberg Ribeiro
@galvesribeiro
Aug 07 2016 17:39 UTC
@grokys yeah :( but I still think the project is awesome and when it get .net core support, I would love to contribute a plugin for VSCode
unless Xamarin move to .net core, I don't think MS will invest so soon in a UI library for .net core
they mentioned they will bring some libs back porst-RTM but I saw no mention to System.Drawing
but even if they do that, would be easy to make Avalonia work on that
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:05 UTC
The primitives are just for graphics math. No rendering components in it.
Gutemberg Ribeiro
@galvesribeiro
Aug 07 2016 18:08 UTC
yep
Andrew
@zezba9000
Aug 07 2016 18:09 UTC
What does AvaloniaVS use to render and process visual layout when it doesn't reverence any of the main API?
Is there any code duplication for rendering / layout? Feel like I'm missing something basic here.
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:12 UTC
I don't know all the specifics, but generally what AvaloniaVS does is pretty cool.
It creates an instance of your application and the window/control you're editing in the other application
And sets the underlying window implementation to be Win32
And creates a WinForms component that has that window handle.
And then embeds that WinForms component into Visual Studio
Andrew
@zezba9000
Aug 07 2016 18:14 UTC
via WPF it looks like... interesting
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:15 UTC
It's very unique.
The nice thing about it is it is actually running your window like it normally would unlike the WPF designer which does some weird stuff to avoid doing that.
Darnell Williams
@Seeker1437
Aug 07 2016 18:18 UTC
Well its limited in some areas but the general operation is as expected. No popups though hehe
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:18 UTC
It's much better than the WPF one though
Andrew
@zezba9000
Aug 07 2016 18:20 UTC
Well if you used the layout engine directly and embedded Direct2D into a WPF Image frame, you could do the same thing without starting up another process.
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:22 UTC
We want to start up a different process though.
Don't want to crash VS because someone's application has a bug.
Darnell Williams
@Seeker1437
Aug 07 2016 18:23 UTC
Yes, and WPF uses an external process as well
Andrew
@zezba9000
Aug 07 2016 18:23 UTC
if its being done like you say, then it can use the lib versions your app will be packaged with
Darnell Williams
@Seeker1437
Aug 07 2016 18:23 UTC
XDesProc
Also it does
Steven Kirk
@grokys
Aug 07 2016 18:23 UTC
yeah i think the advantages of it being done the way it is is that 1. it doesn't crash VS if there's a bug
and 2. it has access to resources defined in code etc
Andrew
@zezba9000
Aug 07 2016 18:24 UTC
Has anyone debugged NuGet packages before? I wanted to use NuGet packages I built from source with the VS ext. So I could take a stab at fixing or adding feature.
Darnell Williams
@Seeker1437
Aug 07 2016 18:25 UTC
The only thing I would change is using a single process with remoting for each control
Instead of several processes for each
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:35 UTC
@zezba9000 You should be able to copy the .pdb files to the bin folder and get VS to ask you for the source location if it hits an exception
Can't remember exactly how to force VS to ask for the source though...
Andrew
@zezba9000
Aug 07 2016 18:36 UTC
It looks like you can add custom NuGet sources: http://docs.nuget.org/release-notes/nuget-2.1
So I could reference ones on my local disk
otherwise the VS extension isn't going to load correctly I don't believe.
err load the stuff it needs rather
but maybe I'm wrong and this is simpler
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:40 UTC
No, you're right.
I was thinking of getting step-through debugging of nuget packages that VS won't let you do. For actually just getting the packages available to VS to test, you're right
Andrew
@zezba9000
Aug 07 2016 18:42 UTC
Would be nice if the process used was in the Wiki on the AvaloniaVS proj.
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 18:43 UTC
You can update the Wiki once you get it working.
I think Github Wikis allow anyone to edit.
Andrew
@zezba9000
Aug 07 2016 18:43 UTC
k
Nelson Carrillo
@nc4rrillo
Aug 07 2016 18:51 UTC
Does anyone know if #288 happens on Windows too?
seems CaretTimerTick fires after the _caretTimer.IsEnabled is set to false
Steven Kirk
@grokys
Aug 07 2016 18:52 UTC
i've never noticed it on windows - doesn't mean to say it doesn't happen though!
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 18:52 UTC
@nc4rrillo Yes same issue on windows.
Steven Kirk
@grokys
Aug 07 2016 18:53 UTC
ah ok :)
Nelson Carrillo
@nc4rrillo
Aug 07 2016 18:53 UTC
ok cool :D going to fix then
Darnell Williams
@Seeker1437
Aug 07 2016 18:55 UTC
;O
of Static
the Xaml works, but I dont think it should
this actually only fail under Android :)
Steven Kirk
@grokys
Aug 07 2016 19:12 UTC
yep - i think this is the problem SuperJMN/OmniXAML#82
if it's becoming a problem, please comment on the omnixaml issue and maybe @SuperJMN can fix it
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 19:13 UTC
not a big problem
Steven Kirk
@grokys
Aug 07 2016 19:13 UTC
please comment anyway, it's been open since april and it's quite a big bug!
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:14 UTC
Just want to let everyone know that the DependencyProperty converter is in the AvaloniaAnalayzers repository
Nelson Carrillo
@nc4rrillo
Aug 07 2016 19:19 UTC
@grokys on the timer thing, my theory is that maybe disposing of the IDisposable returned from CreateTimer may not stop ticks already in flight? It seems to only tick once after you call DispatcherTimer.Stop
Steven Kirk
@grokys
Aug 07 2016 19:19 UTC
@jkoritzinsky nice - i probably won't have much use for it but i imagine others will
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:19 UTC
It's going to help like crazy when converting control libraries
Nelson Carrillo
@nc4rrillo
Aug 07 2016 19:19 UTC
I was able to add an IsEnabled check around the InternalTick method which seems a bit cleaner than checking in the Tick event of the consumer
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:20 UTC
I was trying to convert Oxyplot a while ago and it was extremely tedious and really annoying. Now it'll be much easier.
Steven Kirk
@grokys
Aug 07 2016 19:20 UTC
@nc4rrillo i'd need to look at the code, but i'm kinda otherwise occupied at the moment
Nelson Carrillo
@nc4rrillo
Aug 07 2016 19:20 UTC
okay np I'll just get it up there so you can take a look whenever you get a spare sec
Steven Kirk
@grokys
Aug 07 2016 19:20 UTC
but we really need tests for this sort of thing if possible
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 19:21 UTC

Just want to let everyone know that the DependencyProperty converter is in the AvaloniaAnalayzers repository

@jkoritzinsky Nice, will give a try.

Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:22 UTC
If you find any bugs, post an issue! There's a few issues I know about, but it'll be good to get them onto GitHub.
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 19:23 UTC
does it support attached properties ?
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:24 UTC
Yep
Main known issue is that for coerce and validation callbacks it doesn't convert the parameter types and those parameters currently cannot be lambdas.
Other than that, everything should work
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 19:30 UTC
@jkoritzinsky Just tried the analyzer fix and works nicely
@jkoritzinsky Is it possible also to convert static get/set methods ?
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:37 UTC
Not currently, but I can work on it.
Can you send me a link to some sample source?
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:39 UTC
Next analyzer I'm going to work on is a simple type switching (ie WPF Window type to Avalonia Window type) for all type symbols to help converting
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 19:40 UTC
This would be also great
Darnell Williams
@Seeker1437
Aug 07 2016 19:40 UTC
This is nice!
Steven Kirk
@grokys
Aug 07 2016 19:41 UTC
now that would be really useful!
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:43 UTC
Awesome! Not looking forward to generating the type dictionary though. That's going to be massive.
Steven Kirk
@grokys
Aug 07 2016 19:51 UTC
i did start writing a doc about "avalonia for xaml developers" listing what corresponds to what, but i can't find it now
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:51 UTC
Yeah I know where that is. I'm going to use that as a part of the dev
Steven Kirk
@grokys
Aug 07 2016 19:53 UTC
where is it? :)
Jeremy Koritzinsky
@jkoritzinsky
Aug 07 2016 19:57 UTC
docs/specs/from-wpf.md if I remember correctly
docs/tutorial/from-wpf.md
Darnell Williams
@Seeker1437
Aug 07 2016 20:54 UTC
Nice
Steven Kirk
@grokys
Aug 07 2016 20:57 UTC
Ahh thanka! I didn't realise I'd put it in the repo yet!
Wiesław Šoltés
@wieslawsoltes
Aug 07 2016 20:59 UTC
Is Avalonia.Android working, I can compile and run, but in result I get blank screen.
Darnell Williams
@Seeker1437
Aug 07 2016 21:00 UTC
Yeah have the same issue
Nelson Carrillo
@nc4rrillo
Aug 07 2016 22:07 UTC
I think focus rectangle may be leaking Cairo.Paths also :s
Darnell Williams
@Seeker1437
Aug 07 2016 23:41 UTC
@wieslawsoltes @grokys what event is best used to detect when a window is actually rendered on the screen?
I want to basically wait to do anything until I know for sure the window has been rendered