These are chat archives for AvaloniaUI/Avalonia

2nd
Feb 2017
Darnell Williams
@Seeker1437
Feb 02 2017 01:42 UTC
@kekekeks is that profile pic you?
Nikita Tsukanov
@kekekeks
Feb 02 2017 09:32 UTC
Ehm, who else it's supposed to be?
Skia# with net core support got released
Mihhail Maslakov
@ionoy
Feb 02 2017 09:47 UTC
you will have to remove lib.ammy after restoring packages
i'm differentiating upon target framework when choosing compatible lib.ammy, but in avalonia's case NuGet doesn't know if it's WPF or Avalonia
since they have same target framework (net40)
Matthijs ter Woord
@mterwoord
Feb 02 2017 09:49 UTC
@kekekeks So we'll likely see avalonia for .net core soonish?
Mihhail Maslakov
@ionoy
Feb 02 2017 09:49 UTC
i will separate lib.ammy soon, so you will be able to install-package Ammy.Lib.Avalon
danwalmsley
@danwalmsley
Feb 02 2017 09:58 UTC
@ionoy can you help me understand the term "mixin"
?
looks good will try it out today :)
excellent work
are there any tools to convert existing XAML to ammy?
@kekekeks does that mean we can actually move to .net core now that skia supports it?
Nikita Tsukanov
@kekekeks
Feb 02 2017 10:06 UTC
I'm currently unable to check, but it seems that linux native build is not included in nuget package
But we should be able to target .NET Core now
And it will even run out of the box on windows
Nikita Tsukanov
@kekekeks
Feb 02 2017 10:21 UTC
Yep, no native build for linux yet
Mihhail Maslakov
@ionoy
Feb 02 2017 10:43 UTC
@danwalmsley yeah, but a bit later. busy now.
danwalmsley
@danwalmsley
Feb 02 2017 10:48 UTC
@ionoy :D thanks
@kekekeks so we can probably use it with the dlls we built however
whats needed to produce a .net core build of avalonia, major refactoring or just a new backend?
Mihhail Maslakov
@ionoy
Feb 02 2017 11:22 UTC

@danwalmsley mixin is a set of properties and elements that can be inserted into any element

mixin Transparent() for FrameworkElement {
Opacity: 0.5
}

this mixin used like this:

TextBlock {
#Transparent
}

Will add Opacity: 0.5 to TextBlock. In fact you can now use this #Transparent in any element that is derived from FrameworkElement

what is cool about mixin is that can accept parameters
parameters can have default values
and there is named parameters syntax
so, for example:
mixin SomeStyle(width=100, height=200, background="Green") {...}

TextBlock {
#SomeStyle(background: "Red")
}
TextBlock will have Width: 100, Height: 200, Background: "Red" in this case
danwalmsley
@danwalmsley
Feb 02 2017 11:26 UTC
wow that is powerful
is this unique to ammy?
or its already part of wpf?
Mihhail Maslakov
@ionoy
Feb 02 2017 11:26 UTC
it's unique to ammy
danwalmsley
@danwalmsley
Feb 02 2017 11:26 UTC
wow this is amazing
so ammy uses mixin and generates new xaml
Mihhail Maslakov
@ionoy
Feb 02 2017 11:27 UTC
i think the same :)
yep
danwalmsley
@danwalmsley
Feb 02 2017 11:27 UTC
ok
you are a genius mate
ok so if I have a project with lots of xaml
Mihhail Maslakov
@ionoy
Feb 02 2017 11:27 UTC
i'm not, but thank you :)
danwalmsley
@danwalmsley
Feb 02 2017 11:27 UTC
is there an easy upgrade path to ammy
Mihhail Maslakov
@ionoy
Feb 02 2017 11:28 UTC
as for converter, there is one, but it's too primitive. it doesn't take some stuff into account
danwalmsley
@danwalmsley
Feb 02 2017 11:28 UTC
or manual port?
Mihhail Maslakov
@ionoy
Feb 02 2017 11:28 UTC
i'm planning to upgrade it soon
danwalmsley
@danwalmsley
Feb 02 2017 11:28 UTC
ok well I wont rush, but I can start adding new stuff in ammy
Mihhail Maslakov
@ionoy
Feb 02 2017 11:28 UTC
so, in few days you could convert your project almost automatically
danwalmsley
@danwalmsley
Feb 02 2017 11:28 UTC
its a perfect match for avalonia
Mihhail Maslakov
@ionoy
Feb 02 2017 11:28 UTC
agreed
danwalmsley
@danwalmsley
Feb 02 2017 11:28 UTC
my brother I was trying to teach him some XAML last night
hes just getting into it
<Grid>
Mihhail Maslakov
@ionoy
Feb 02 2017 11:29 UTC
you always can contact me via github issues or email if you have any questions
danwalmsley
@danwalmsley
Feb 02 2017 11:29 UTC
Grid.RowDefinitions
RowDefinition />
all that nonsense
ammy really smooths it all out :)
Mihhail Maslakov
@ionoy
Feb 02 2017 11:29 UTC
yeah, grid stuff is really awkward in xaml
danwalmsley
@danwalmsley
Feb 02 2017 11:29 UTC
ok well I will keep in touch
and thanks for taking time to explain mixins
Mihhail Maslakov
@ionoy
Feb 02 2017 11:30 UTC
you're welcome
danwalmsley
@danwalmsley
Feb 02 2017 11:30 UTC
once I port Avalon studio to ammy, and have it running on .net core, maybe you might like to feature it as an example of project that uses it?
and avalonia too
Mihhail Maslakov
@ionoy
Feb 02 2017 11:30 UTC
yeah, it would be cool
danwalmsley
@danwalmsley
Feb 02 2017 11:30 UTC
I will have to bring an ammy compatible editor to Avalon studio
so people on mac / Linux could us it to fully develop avalonia applications
ok better get back to work, thanks for help :)
oh 1 more thing
Mihhail Maslakov
@ionoy
Feb 02 2017 11:31 UTC
i don't know how easy it would be to port visual studio extension, but we could do simplified version
danwalmsley
@danwalmsley
Feb 02 2017 11:31 UTC
what did you use for that?
Mihhail Maslakov
@ionoy
Feb 02 2017 11:32 UTC
wp + impreza
danwalmsley
@danwalmsley
Feb 02 2017 11:32 UTC
;) I need a site for Avalon studio soon
good to know
Mihhail Maslakov
@ionoy
Feb 02 2017 11:33 UTC
i found it really easy to use and it has lots of options
can recommend :)
danwalmsley
@danwalmsley
Feb 02 2017 11:33 UTC
how much does it cost the theme?
Mihhail Maslakov
@ionoy
Feb 02 2017 11:33 UTC
~50
danwalmsley
@danwalmsley
Feb 02 2017 11:33 UTC
Gutemberg Ribeiro
@galvesribeiro
Feb 02 2017 11:47 UTC
so, now SkiaSharp on .net core :)
Nikita Tsukanov
@kekekeks
Feb 02 2017 14:07 UTC
@SuperJMN I wonder if we could get something like mixins in OmniXAML
@danwalmsley For .NET Core support we need to make our Skia backend target .NETStandard. Win32 backend already does so. Progress is tracked in #875
Then GTK# backend needs to be packaged and merged to master
I'll integrate everything in a separate branch and upload packages to some feed, I think
danwalmsley
@danwalmsley
Feb 02 2017 15:52 UTC
popup is a total nightmare
Nikita Tsukanov
@kekekeks
Feb 02 2017 16:26 UTC
danwalmsley
@danwalmsley
Feb 02 2017 16:43 UTC
wow I thought it would have been a lot more work!
Nikita Tsukanov
@kekekeks
Feb 02 2017 16:47 UTC
Most of it was already done
#875 has quite a lot of commits, you know
Wiesław Šoltés
@wieslawsoltes
Feb 02 2017 16:49 UTC
@kekekeks Is this stand-alone .net core app ?
Nikita Tsukanov
@kekekeks
Feb 02 2017 16:52 UTC
Yep
danwalmsley
@danwalmsley
Feb 02 2017 16:53 UTC
so will this work on Linux too?
Nikita Tsukanov
@kekekeks
Feb 02 2017 16:54 UTC
Nope, gtk3 backend not integrated there yet
For now I'm trying to figure out what to do with nuget deps
You see, RX3.1 doesn't have Profile7 version anymore
and RX 3.0 doesn't have netstandard/netcoreapp build
Oh, wait
It does
Nikita Tsukanov
@kekekeks
Feb 02 2017 16:59 UTC
So the actual issue is with Splat + Avalonia.ReactiveUI
danwalmsley
@danwalmsley
Feb 02 2017 18:28 UTC
Any solution
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:07 UTC
danwalmsley
@danwalmsley
Feb 02 2017 19:16 UTC
@kekekeks what do I need to do to bring this to Avalon studio?
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:17 UTC
You will lose XAML previewer
danwalmsley
@danwalmsley
Feb 02 2017 19:18 UTC
I lost that long ago
I don't need it anymore
I think me using mef will be a problem
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:19 UTC
NuGet.config
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
</packageRestore>
<packageSources>
<add key="NuGet 3 (plain)" value="http://api.nuget.org/v3/index.json" />
</packageSources>
<bindingRedirects>
</bindingRedirects>
</configuration>
Eric Mellino
@mellinoe
Feb 02 2017 19:32 UTC
@kekekeks I'm super excited to see the progress on .NET Core support! If you hit any blockers or need assistance with anything, I'd be happy to help. I'd love to finally use it myself in some projects.
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:36 UTC
For now there are 2 issues:
1) No proper native Skia# binaries for Linux. There is a recently created build script, but it's not ready. I think that having a build environment based on HBB will allow Skia# to have one binary for most distros
2) We need either proper Quartz-based backend for OS X or somehow obtain portable set of GTK3 dylibs. For now we are stuck with GTK3 from brew
Eric Mellino
@mellinoe
Feb 02 2017 19:52 UTC
Can the Skia backend not be used on OSX as well?
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:53 UTC
Yep, Skia# nuget package has prebuilt libSkiaSharp.dylib included
Eric Mellino
@mellinoe
Feb 02 2017 19:54 UTC
I see, so you're referring to the windowing/input handling for OSX, then?
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:54 UTC
Yes. GTK3 backend should handle that for now
But GTK3 is a 30MB+ blob that's a bit complicated to distribute
Eric Mellino
@mellinoe
Feb 02 2017 19:57 UTC
Might be a dumb suggestion since I'm not sure what all GTK3 is used for here, but is something like SDL2 an option?
Nikita Tsukanov
@kekekeks
Feb 02 2017 19:58 UTC
SDL2 is also a blob that's a bit complicated to distribute
The optimal solution is to use libobjc.A.dylib and somehow talk to Quartz
So we'll have a small managed library instead of tons of native binaries
Eric Mellino
@mellinoe
Feb 02 2017 20:01 UTC
Indeed. Have you checked out what OpenTK does? They have Quartz and Cocoa backends, as well as an SDL2 backend (for all platforms). I did find that the SDL2 backend was much less buggy than the native OSX backends, though
Nikita Tsukanov
@kekekeks
Feb 02 2017 20:01 UTC

They have Quartz and Cocoa backend

Which are based on Xamarin.Mac

Eric Mellino
@mellinoe
Feb 02 2017 20:02 UTC
No, I don't think that's right
Nikita Tsukanov
@kekekeks
Feb 02 2017 20:02 UTC
They have Carbon-based backend
But Carbon is deprecated
And not available for 64-bit apps
Eric Mellino
@mellinoe
Feb 02 2017 20:03 UTC
I don't think the other backends have anything to do with Xamarin
It looks like they are just PInvoking to some mac libraries, like "/usr/lib/libobjc.dylib", or CoreFoundation, etc.
Nikita Tsukanov
@kekekeks
Feb 02 2017 20:04 UTC
Hm
They are using libobjc.dylib
Neat
@jkoritzinsky @galvesribeiro
Should be a good starting point
Gutemberg Ribeiro
@galvesribeiro
Feb 02 2017 20:08 UTC
interesting
at least for OSX
iOS still need their compiler like you said
Eric Mellino
@mellinoe
Feb 02 2017 20:09 UTC
By the way, I ended up using the SDL2 backend in my game because those "default" backends for OSX were a bit buggy in my experience. Actually, they worked very well for most things but I was hitting a lot of problems with mouse positions being bogus. That might be a problem for Avalonia :smile: . I didn't try to figure out the problem too deeply, though, so it might have been my fault in the first place. It was easier to just use SDL2, so I didn't bother investigating.
Nikita Tsukanov
@kekekeks
Feb 02 2017 20:11 UTC
The problem with using SDL2 will be native open/save file dialogs, native message boxes, etc