These are chat archives for AvaloniaUI/Avalonia

25th
Feb 2018
Jonas Jermann
@jjermann
Feb 25 2018 00:00
hi, can I show a pdf or svg image in avalonia views (from memory/vm, not a file)? If yes: Is there some example code?
(basically a result from oxyplot)
Nikita Tsukanov
@kekekeks
Feb 25 2018 00:04
It's probably better to use oxyplot itself
I had a somewhat updated version somewhere...
Jonas Jermann
@jjermann
Feb 25 2018 00:05
it doesn't support avalonia for core yet?
Try this one
Package versions need to be updated
But it should work otherwise
Jonas Jermann
@jjermann
Feb 25 2018 00:07
nice, thanks, it would be nice if this was on nuget
Nikita Tsukanov
@kekekeks
Feb 25 2018 00:12
It was at some point, but then oxyplot guys have excluded it from the main repository for some reason
Jose Medrano
@netonjm
Feb 25 2018 07:51
Hello!
lindexi
@lindexi
Feb 25 2018 11:23
Our team write a test framework easiwin/MSTestEnhancer and I want to use it in AvaloniaUI
Nikita Tsukanov
@kekekeks
Feb 25 2018 11:26
We probably need some kind of a headless windowing platform, so it would be easier to write unit tests
Right now we are using one internally, but it's not available for the outside world
lindexi
@lindexi
Feb 25 2018 11:27
Ok.
lindexi
@lindexi
Feb 25 2018 11:32
I see something in the code that have not used the C# 7.0 feature. Can I modify it?
Nikita Tsukanov
@kekekeks
Feb 25 2018 11:37
1) some of the new language features might introduce performance degradation
2) we try to avoid changes that don't change any logic (aka formatting changes), since it makes hard to reason about file history when trying to find what caused bugs
So it's probably better to leave the code as it is
unless you are fixing a bug or implementing a new feature and need to change that particular place anyway
We are also using corefx/coreclr guidelines
lindexi
@lindexi
Feb 25 2018 11:39
Thx
Marcos Vinicius Maia
@redbaty
Feb 25 2018 16:09
Hey is thnere any support for dropshadows? Both on controls and on the window
Darren R. Starr
@darrenstarr
Feb 25 2018 17:20
Probably been asked... is it possible to start an avalonia app on Windows without the console Window dangling in the background?
danwalmsley
@danwalmsley
Feb 25 2018 17:23
See this wiki page....
Darren R. Starr
@darrenstarr
Feb 25 2018 17:24
nifty... thanks
Dan... can I ask you a question or two before I invest too much time in finding out that Avalonia is or isn't the right tool for me?
danwalmsley
@danwalmsley
Feb 25 2018 17:25
Hopefully at some point we can have this automatically patched at build time in future
Sure go aheaf
Ahead
Darren R. Starr
@darrenstarr
Feb 25 2018 17:29
Ok... I'm writing a small network management tool (been done a million times but I'll do it a million and first because I'm an idiot) and I need a front end. I will implement a terminal emulator (think xterm/vt100/etc...). I did it once before for WinRT (a long while back... lost the code somewhere) and it was awful anyway. Now I'm considering either Direct2D or Skia. I assume if I start with Avalonia, I'll have to stay with Avalonia. Is Avalonia currently a good solution for writing apps that I'll have to support for 5 years or more, or would I be better off doing Direct2D for now and waiting for Avalonia to evolve a bit more before committing
I would have just used UWP RichTextBox for now, but for some reason, it's a piece of junk
danwalmsley
@danwalmsley
Feb 25 2018 17:30
Well first things to say is obviously this is still beta, however
IV managed to create an IDE from it see Github.com/VitalElement/AvalonStudio to see a fraction of what is possible.
Avalonia uses direct2d or Skia underneath
If you are familiar with uwp, win rt, wpf etc then you will feel comfortable here
At VT100 control should be possible, I'd recommend you look at
Marcos Vinicius Maia
@redbaty
Feb 25 2018 17:33
Hey since you're here, is there any support for effects, for example dropshadow?
danwalmsley
@danwalmsley
Feb 25 2018 17:33
Which is a port of Avalon edit and is reasonably stable now
@redbaty i think shadows are not implemented yet, definitely not outside the window
Darren R. Starr
@darrenstarr
Feb 25 2018 17:34
I found my way here because of the Skia backend.
Marcos Vinicius Maia
@redbaty
Feb 25 2018 17:34
@danwalmsley Hmm, it would be really nice if there was some port of md on xaml to avalonia, anyway ty for the answer
danwalmsley
@danwalmsley
Feb 25 2018 17:35
No problem, open an issue I'm sure that shadows won't be too hard to implement
Darren R. Starr
@darrenstarr
Feb 25 2018 17:35
The AvaloniaEdit could make it all worth while... thanks... I think I'll have a smoke... dive in and then decide how much of my life I'm forfeiting on this sub-project :)
danwalmsley
@danwalmsley
Feb 25 2018 17:36
@darrenstarr if you do decide to go this root iv been interested in a vt100 terminal control for Avalon Studio and we could work together on it
Darren R. Starr
@darrenstarr
Feb 25 2018 17:36
Sounds great... I'd gladly handle backend if you'd be willing to put some work in on the front end
danwalmsley
@danwalmsley
Feb 25 2018 17:36
Probably just a class that extends AvaloniaEdit
I can do that
Darren R. Starr
@darrenstarr
Feb 25 2018 17:36
Could be.
danwalmsley
@danwalmsley
Feb 25 2018 17:37
Certainly, I don't know the instructions and out of the protocol, but if your handling that I can probably get the text editor control. To behave as you need it 😀
Darren R. Starr
@darrenstarr
Feb 25 2018 17:37
Generally most of the better terminal emulators generally are. The only catch is that to make VT100 work well, it's usually important to keep track of screen size
Sounds good Dan... but "Getting a smoke" was code for "Going to the bathroom before I leave a puddle but didn't want to sound tacky" :)
danwalmsley
@danwalmsley
Feb 25 2018 17:38
Haha
Darren R. Starr
@darrenstarr
Feb 25 2018 17:38
I'll be back in a bit
danwalmsley
@danwalmsley
Feb 25 2018 17:38
Well I don't have time to look at it today, but if you created a repo and made a start I could have a look on a couple of days 😀
Ok speak soon
Darren R. Starr
@darrenstarr
Feb 25 2018 17:46
I'll hack around a little bit with getting the protocol, unit tests and model up and running. I suspect we can expose a view model of some sort that would produce spans. For now, I'll just spend a small effort hacking a drawing context as a view that works directly from the model.
Dan... what time zone are you in?
danwalmsley
@danwalmsley
Feb 25 2018 17:55
UK
What about yourself?
It's 6pm here
Darren R. Starr
@darrenstarr
Feb 25 2018 17:55
Norway... it seems you have as poor of a work schedule as I do.
Benedikt Schroeder
@Gillibald
Feb 25 2018 18:24
Tody i tried to implement BorderThickness in a way WPF etc. does it and it works quiet well even changing CornerRadius that way wasn't a problem but when i changed everything to use Thickness instead of a single double value i realised your ContentPresenter has its own Border rendering why is that so? In my understanding a ContentPresenter should not have its own visual but i could be wrong.
Steven Kirk
@grokys
Feb 25 2018 18:27
We took that from UWP which does the same, it reduces quite significantly the depth of the visual tree in large applications
Benedikt Schroeder
@Gillibald
Feb 25 2018 18:30
Ahh okay. But couldn't ContentPresenter inherit from Border or some base class both start from? That way you dont have to write the rendering twise.
Nikita Tsukanov
@kekekeks
Feb 25 2018 19:32
@redbaty I think I had some experimental shadow support for drop shadow for highlighting scenegraph layers
It was a big hack, however
The main problem with drop shadow effect is that we need to introduce a new layer to render it
And currently our layers occupy the whole window
So memory consumption will be huge
DeferredRenderer needs to detect the proper layer size
@grokys
Darren R. Starr
@darrenstarr
Feb 25 2018 19:37
Ok.... I'm trying to fly before I can crawl. Is there a "Stupid people's guide" or simple example for how to bind a click event to a method?
Darren R. Starr
@darrenstarr
Feb 25 2018 19:44
never mind... figured it out.
Steven Kirk
@grokys
Feb 25 2018 20:39
@darrenstarr there is in our WIP documentation https://github.com/AvaloniaUI/avaloniaui.net/pull/8/files
@kekekeks maybe we should merge that PR? it's a WIP but docs are a continuous WIP really...
would it be difficult to update the site when a merge to master occurs? you mentioned it before
@Gillibald hmm yeah making ContentPresenter inherit from Border might make sense