These are chat archives for AvaloniaUI/Avalonia

16th
Feb 2017
nictaylr
@nictaylr
Feb 16 2017 07:35
hello!
what is the status of .net core support? is it at a stage where it is usable and comparable to avaloniaui on mono?
@danwalmsley embedded font loading would be very awesome to have
Nikita Tsukanov
@kekekeks
Feb 16 2017 09:19

If I minimize and come back its all black

It seems that layout pass doesn't happen in time

Since black window means that surface with the right size was actually created, but nothing got rendered to it
danwalmsley
@danwalmsley
Feb 16 2017 11:13
@nictaylr .net core supppoet
Support is now
Ready
BTW, is there someone who actually understand how our grid works?
Matthijs ter Woord
@mterwoord
Feb 16 2017 12:00
how it works under the covers, or functionally speaking?
James Walmsley
@jameswalmsley
Feb 16 2017 12:00
@grokys regarding the Direct2d support after installing VS2017 ... I didn't try that yet but I can have ago now and let you know.
Nikita Tsukanov
@kekekeks
Feb 16 2017 12:04
@mterwoord under the covers
Matthijs ter Woord
@mterwoord
Feb 16 2017 12:05
ok.can't help you there. :)
Nikita Tsukanov
@kekekeks
Feb 16 2017 12:05
You see, it was initially translated line-by-line from Moonlight's C++ implementation
Steven Kirk
@grokys
Feb 16 2017 12:06
yeah, it's there because it was in moonlight, basically
i don't know of anyone who understands how it works :(
Probably need to port tests from moonlight before touching grid
Matthijs ter Woord
@mterwoord
Feb 16 2017 13:01
if there are tests, that's the way to go for sure.. :)
Nikita Tsukanov
@kekekeks
Feb 16 2017 13:03
I'm not sure that they aren't failing already...
Steven Kirk
@grokys
Feb 16 2017 13:09
yeah i tried porting those tests over
however i think i changed things too much
Nikita Tsukanov
@kekekeks
Feb 16 2017 13:10
So tests don't pass anymore?
Steven Kirk
@grokys
Feb 16 2017 13:10
probably need to properly use the testing framework that exists in the tests
i never merged the tests to master as there were too many failing tests
interestingly when running those tests on WPF, lots fail too
so ¯_(ツ)_/¯
Magnus Lindhe
@mgnslndh
Feb 16 2017 15:07
Hi Nikita, thanks for helping out yesterday.
I'm trying to host Avalonia inside a WPF application but if I add the nuget Avalonia.Desktop I do not find the WPF host in Avalonia.Win32.Embedding. That whole namespace is missing from the assembly. Is the expected behaviour or am I missing something
Magnus Lindhe
@mgnslndh
Feb 16 2017 15:15
I'm guessing the nuget packages are too old
Andrey Kunchev
@donandren
Feb 16 2017 15:22
@wieslawsoltes impressive demo of Core2D+Avalonia, nice work
Andrey Kunchev
@donandren
Feb 16 2017 15:53
Magnus Lindhe
@mgnslndh
Feb 16 2017 15:54
Thanks! I was just about to setting up my own local source, but this is way better
Weston
@ronnyek
Feb 16 2017 16:11
oi
Wiesław Šoltés
@wieslawsoltes
Feb 16 2017 16:44
@donandren Thanks! The rendering performance of Avalonia+Direct2D is really good compared to WPF
Magnus Lindhe
@mgnslndh
Feb 16 2017 16:45
Having a bit of trouble with getting Avalonia+Direct2D to run in my app. Trying to make a simple WPF application and see if that works
Jeremy Koritzinsky
@jkoritzinsky
Feb 16 2017 16:47
You need to use Skia if you are using the embedding as of now
Magnus Lindhe
@mgnslndh
Feb 16 2017 16:47
Ah, that might explain it :)
Magnus Lindhe
@mgnslndh
Feb 16 2017 17:00
I get "Could not CreateEmbeddableWindow(): IWindowingPlatform is not registered."
``
public partial class App : System.Windows.Application
    {
        App()
        {
            this.Startup += App_Startup;
        }

        private void App_Startup(object sender, StartupEventArgs e)
        {
            Avalonia.AppBuilder.Configure<AvaloniaApp>().UseWin32().UseSkia();
        }
    }
Ah, forgot SetupWithoutStarting()
Works now
But in my regular App I get the same error. Probably because some Fody/Costura issue where not all assemblies are available at runtime. Need to look into that
We should contact this guy
@warappa what would be involved in integrating XamlCSS with Avalonia?
David Rettenbacher
@warappa
Feb 16 2017 18:38
Hi @danwalmsley, thanks for inviting me in!
danwalmsley
@danwalmsley
Feb 16 2017 18:39
hey, I saw your great work bringing css to xaml
have you come across Avalonia before?
David Rettenbacher
@warappa
Feb 16 2017 18:43

XamlCSS sits on top of the vanilla xaml styling-system: Style-objects get generated based on matching elements, added to Application.Resources and then assigned to the Style-property of the elements.

What XamlCSS needs is:

  • wrapper for visual elements ("DomElement")
  • a way to parse markup-extensions
  • a way to detect ui-hierarchy-updates
danwalmsley
@danwalmsley
Feb 16 2017 18:44
@SuperJMN wrote omnixaml, so he may know about parsing markup extensions
Avalonia has a styling system, very basic one
where you can write css style selectors
but with XAML syntax, not css
i.e.
David Rettenbacher
@warappa
Feb 16 2017 18:45
I have come across Avalonia just a month ago as Daniel Kornev pointed me to it on twitter.
I had a quick look on AvaloniaStudio.
danwalmsley
@danwalmsley
Feb 16 2017 18:46
<Style Selector="Button#name" />
ah nice!
so what do you think would be involved in bringing your css project to support avalonia?
I saw you have various projects to support wpf, uwp, etc
@kekekeks you around?
@grokys
Steven Kirk
@grokys
Feb 16 2017 18:48
hello?
danwalmsley
@danwalmsley
Feb 16 2017 18:51
Hey is was thinking you might know better on how
David Rettenbacher
@warappa
Feb 16 2017 18:52

Some specialized derived classes for element-wrapping (DOM), a service to read/write dependency-properties, markup-parser, native style generation and ui-update-detection.

But it depends also on how close Avalonia styling is to "standard" xaml styling

danwalmsley
@danwalmsley
Feb 16 2017 18:52
we can help @warappa integrate his css for XAML project with us
A
danwalmsley
@danwalmsley
Feb 16 2017 18:57
I have to go, right now, but will take a better look at your project, for now I think @kekekeks and @grokys might be interested also :)
Steven Kirk
@grokys
Feb 16 2017 19:03
@warappa we're not very close the WPF styling really - in fact that's the main difference between us and WPF
we use a more-CSS like system with selectors etc
David Rettenbacher
@warappa
Feb 16 2017 19:05

OK, bye :)

Having Avalonia-support would be a nice addition to XamlCSS, but as you already have a selector-based styling in place, I wonder if only integrating a css-parser into Avalonia would be better for your platform (I think thats whats missing in Avalonia right now if I understand correctly). We could nevertheless try to make our css-dialects compatible :)

@grokys What is the status of styling in Avalonia right now?
as you can see we have selectors on the styles such as <Style Selector="Button:pointerover /template/ ContentPresenter">
to be honest i'm not sure how a more-CSS-like syntax would work. for example I assume you can't set ControlTemplates in a CSS style
David Rettenbacher
@warappa
Feb 16 2017 19:11
You're right, you can't express objects like a template in css - but that's not too much of a problem.
In XamlCSS you can refer to Resources like ControlTemplate: #StaticResource controlTemplateKey
David Rettenbacher
@warappa
Feb 16 2017 19:35
As I see it, XamlCSS would only have the advantage of having a css-2-style-parser (with some sass pre-processor features).
The other things like multiple combinable styles per element and css-selectors are already first-class-citizens in Avalonia and Avalonia extends on this with pseudo-classes like :pointerover, which are not present in XamlCSS. I'm not sure why people should want to use XamlCSS if you already have this baked in... (except for the css things of course ;))
Steven Kirk
@grokys
Feb 16 2017 19:55
yeah, me neither to be honest - it's just a matter of familiar CSS syntax i guess
curea
@curea
Feb 16 2017 22:12
has anyone been able to get an avalonia app running on mac with a mac style menu?