These are chat archives for AvaloniaUI/Avalonia

16th
Jun 2018
Steven Kirk
@grokys
Jun 16 2018 11:04
hi @rconde01 , well we don't as such provide "user-drawn controls". we use control templates to style controls, which i don't think would be helpful for your use-case?
i.e. controls are made up from other more primitive controls
rconde01
@rconde01
Jun 16 2018 11:26
Ah...so you can’t make a fully custom control in avalonia?
Steven Kirk
@grokys
Jun 16 2018 12:08
Yes all controls are fully customizable
But they're not "user-drawn"
Sorry I'm on my phone at the moment, lookup "look less controls" in relation to WPF and UWP, we use the same technique
rconde01
@rconde01
Jun 16 2018 12:25
Ok I think I see what you’re saying
Wiesław Šoltés
@wieslawsoltes
Jun 16 2018 13:12
@rconde01 This is great presentation about look less controls https://youtu.be/DLHhZJkSqWk?t=9m50s
rconde01
@rconde01
Jun 16 2018 13:27
Thanks! I’ll check that out. So what do you do if you need a control which isn’t fulfilled by the standard control library?
Wiesław Šoltés
@wieslawsoltes
Jun 16 2018 13:35
Create your own like this:
And provide template
this is how Button control is defined in Avalonia
rconde01
@rconde01
Jun 16 2018 14:08
I’m surprised to see System.Windows.Input...is that in .net core?
rconde01
@rconde01
Jun 16 2018 14:40
Weird
Wiesław Šoltés
@wieslawsoltes
Jun 16 2018 14:56
why
its just ICommand commonly used in xaml frameworks
rconde01
@rconde01
Jun 16 2018 16:07
I guess because Windows is in the name
If you know off the top of your head...is it in .net standard too?
Ahmed Tarek
@pushqrdx
Jun 16 2018 16:12
guys i am pretty sure avalonia had a cross platform webview control before, am i mistaken ?
Ahmed Tarek
@pushqrdx
Jun 16 2018 16:19
sorry but can i use it to build cross platform hybrid c# apps
and is there any sample app or so
ahopper
@ahopper
Jun 16 2018 16:24
I've not tried it but I don't see why not, I think there is also another option using chromium embedded , can't find a link right now
Ahmed Tarek
@pushqrdx
Jun 16 2018 16:26
i have been searching for weeks for the best way to build hybrid cross platform c# based apps and i am really struggling finding any reasonable solutions
i want to build the UI using HTMl/CSS and have the main app logic in C#, Sadly most solutions are just hacks
i found a framework called Sciter but then i am locked to desktop (no mobile)
ahopper
@ahopper
Jun 16 2018 16:34
the other avalonia browser control option is here https://github.com/AvaloniaUI/Avalonia/wiki/3rd-Party-Control-Gallery
Wiesław Šoltés
@wieslawsoltes
Jun 16 2018 17:15

If you know off the top of your head...is it in .net standard too?

@rconde01 yes .NET Standard
2.0, 1.6, 1.4, 1.3, 1.2, 1.1, 1.0

i have been searching for weeks for the best way to build hybrid cross platform c# based apps and i am really struggling finding any reasonable solutions

@pushqrdx Did you see https://github.com/aspnet/Blazor

Ahmed Tarek
@pushqrdx
Jun 16 2018 17:21
@wieslawsoltes yeah i did and it's pretty promising yet i am afraid to use it in production as it seems to be pretty alpha. Besides idk how to utilize it on Desktop/Mobile or if it's even possible to do so.
ahopper
@ahopper
Jun 16 2018 17:23
I guess you could wrap it in electron or the react, vue or cordova mobile web wrappers
Wiesław Šoltés
@wieslawsoltes
Jun 16 2018 17:25
yeah there is also https://github.com/praeclarum/Ooui its also pretty new
Ahmed Tarek
@pushqrdx
Jun 16 2018 17:26
if you were me (non employed free lancer) and i often do my own projects. Would you make the decision to go with Blazor.. It looks so nice and virtually checks all the boxes. No JS, Razor powered, potentially cross platform with a single code base maybe even zero modifications
the only thing that worries me is Microsoft's tendency to just abandon good stuff
at such point i might have built a lot would i be just forced to throw everything ?, Your opinions will really help me make a right decision
yowl
@yowl
Jun 16 2018 17:35
@pushqrdx If you can wait until it Blazor at least comes out of experimental then thats something, if it gets dumped later you'll be left with some c# and some html+css which hopefully wont be totally useless
Ahmed Tarek
@pushqrdx
Jun 16 2018 17:38
that sound pretty darn reasonable. i might even be able to easily migrate to something like Electron.NET or other ASP.NET core solution given that my code will be C# + Razor/CSS
which is easily converted to ASP.NET core app and maybe self hosted and deployed
rconde01
@rconde01
Jun 16 2018 18:27
@wieslawsoltes I see how things work for something simple like a button - but what about grid type things where the layout and function is much more complex?
rconde01
@rconde01
Jun 16 2018 19:08
well - after watching that video I see you don't have a grid (although I did see Grid.cs in the repo)...but how would it work in theory?
Stano Turza
@Sorien
Jun 16 2018 19:12
O.o that presentation, 30:00, did anybody know that kekekeks had some Effect's implementation? can i find it somewhere?
Nelson Carrillo
@nc4rrillo
Jun 16 2018 19:16
We do have a grid
rconde01
@rconde01
Jun 16 2018 19:34
Where is the layout rendering logic/XAML in the code?
Nelson Carrillo
@nc4rrillo
Jun 16 2018 19:35
Grid inherits from Panel which has MeasureOverridd and ArrangeOverride
rconde01
@rconde01
Jun 16 2018 19:35
I’m trying to figure out where the complex structure comes from
Nelson Carrillo
@nc4rrillo
Jun 16 2018 19:36
It’s a two pass layout system
rconde01
@rconde01
Jun 16 2018 19:36
Oh...ok, ill look more closely at that...thanks
ahopper
@ahopper
Jun 16 2018 20:29
you could look at stackPanel or WrapPanel they are a halfway house in terms of complexity and might help make it clearer
rconde01
@rconde01
Jun 16 2018 20:56
Ah wait...so grid is a layout
?
I meant a datagrid...which I guess you could have a grid of text boxes...but would be inefficient I think
Nelson Carrillo
@nc4rrillo
Jun 16 2018 20:58
DataGrid is a work in progress. #1519
rconde01
@rconde01
Jun 16 2018 20:59
Ok I’ll check that...my interest is both needing one, but also seeing how it would be implemented
Nelson Carrillo
@nc4rrillo
Jun 16 2018 21:14
they are fairly complex
vaseer45
@vaseer45
Jun 16 2018 23:01
@grokys apologies for the very late response. I've repro-ed and it seems to be happening only when a ListBox is involved - it is weird and I'm wondering if my code is at fault or if I'm missing something - repro solution here: https://drive.google.com/file/d/1hvVJ864EPClUshw47DDA5LeF_e0YzNVl/view?usp=sharing