These are chat archives for AvaloniaUI/Avalonia

21st
Jun 2017
Matthijs ter Woord
@mterwoord
Jun 21 2017 06:07
Ah. I dont have an issue there now.. but i'm targetting .net standard/core 2.0
Does avalonia have a catch-all exceptino handlign event somewhere?
Nikita Tsukanov
@kekekeks
Jun 21 2017 07:16
I'm not sure how to implement that properly
Since exceptions might not be even recoverable
There is a native frame on the stack when platform events (user input, paint, resize, etc) are being handled
Which is unaware of .NET exceptions
It works fine on Windows, since CLR uses SEH there
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:18
can't we catch before?
so that at least our own exceptions can be handled in a generic way?
(ie, an error in event handlers)
Nikita Tsukanov
@kekekeks
Jun 21 2017 07:19
We probably need some 'proxy' toplevel implementations
that will wrap events from platform-specific ones
And do exception handling there
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:19
it's something planned?
Nikita Tsukanov
@kekekeks
Jun 21 2017 07:20
There is a lot of room for discussion
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:20
?
Nikita Tsukanov
@kekekeks
Jun 21 2017 07:20
how exactly it should be implemented
Since it has to be platform-friendly
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:20
sure, but i mean, the general idea of "a way to handle exceptions at 1 spot" is something planned?
Nikita Tsukanov
@kekekeks
Jun 21 2017 07:21
We'd probably somehow pass exceptions back to Application::Run
And leave user with platform-specific unhandled exception handling in iOS/Android
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:24
hmm. I wish i had time to contribute back. if at all, i'd like to contribute to the vs extension shortterm....
how hard is it to get going with that/
Nikita Tsukanov
@kekekeks
Jun 21 2017 07:35
vs extension is a total mess right now
I'm not sure if it will even compile for you
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:44
bummer..
was hoping to get a new dev going with avalonia soonish..
without intellisense etc in an ok-enough state....
Matthijs ter Woord
@mterwoord
Jun 21 2017 07:55
a while ago you (?) mentioned something aout a rewrite coming of the vs extension?
Steven Kirk
@grokys
Jun 21 2017 08:57
@kekekeks what do you think about merging scenegraph sometime soon? I tried it with Core2D and AvalonStudio and it seems to work
Nikita Tsukanov
@kekekeks
Jun 21 2017 11:24
@mterwoord Intellisense should work mostly fine
If it doesn't, you are probably doing something wrong
Probably this one
@grokys sure, I just need to find a hour or two to go though the code
Matthijs ter Woord
@mterwoord
Jun 21 2017 11:33
i have it multitargetted with .netstandard2.0 and .net461
Nikita Tsukanov
@kekekeks
Jun 21 2017 11:39
Then it should work
Matthijs ter Woord
@mterwoord
Jun 21 2017 11:39
doesn't..
while the window works runtiem
Nikita Tsukanov
@kekekeks
Jun 21 2017 11:40
Try to create a fresh app from template
And check if intellisense works there
Matthijs ter Woord
@mterwoord
Jun 21 2017 11:52
that works..
Nikita Tsukanov
@kekekeks
Jun 21 2017 11:59
So it was unable to load metadata from your project for some reason
Matthijs ter Woord
@mterwoord
Jun 21 2017 12:38
dammit. in my solution, I have 4 projects (shell, core, viewmodels, views). If i move the view from views to core, the designer works
:S
Matthijs ter Woord
@mterwoord
Jun 21 2017 12:46
any way to ge ta log?
Matthijs ter Woord
@mterwoord
Jun 21 2017 13:34
@kekekeks What's the state and future plans of the current avalonia extension?
Matthijs ter Woord
@mterwoord
Jun 21 2017 13:46
Hmm, the "avalonia xaml detection" part is goign wrong.
if i rename things to .paml it works :)
Matthijs ter Woord
@mterwoord
Jun 21 2017 14:11
how much work would it be to implement binding intellisense?
Weston
@ronnyek
Jun 21 2017 14:31
should I be able to use something like mahapps metro in my avalonia test app/
Matthijs ter Woord
@mterwoord
Jun 21 2017 14:32
mahapps is wpf
not avalonia
Weston
@ronnyek
Jun 21 2017 14:32
I didnt realize it was COMPLETELY different
is this why toolbox has zero controls? just have to hammer everything out via raw xaml?
Matthijs ter Woord
@mterwoord
Jun 21 2017 14:34
yep
but to be honest, i do that most of the time with wpf as well. ;)
Weston
@ronnyek
Jun 21 2017 14:37
I avoid xaml
most of the time =)
I just think avalonia could solve one of the current problems at hand
Matthijs ter Woord
@mterwoord
Jun 21 2017 14:50
i think if you want to make use of the advantages of wpf over winforms, you pretty much end up doing xaml by hand (at least partially)
Johan Larsson
@JohanLarsson
Jun 21 2017 14:50
I avoid the designer, all the time.
Matthijs ter Woord
@mterwoord
Jun 21 2017 14:51
with wpf, i only use it now and then to use smart tags, or whatever they are called
Weston
@ronnyek
Jun 21 2017 14:53
ehh
for stuff like modifying control templates and stuff
I feel like designer is better
doesn't look like vs extension provides all the intellisense for that avalonia specific xaml does it?
Matthijs ter Woord
@mterwoord
Jun 21 2017 14:59
did you install the avalonia vs addin?
Weston
@ronnyek
Jun 21 2017 14:59
yes sir I did
and there is squigglies EVERYWHERE
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:00
do you see the Help and Fix Me links?
Weston
@ronnyek
Jun 21 2017 15:00
but code runs and xaml even previews pertty good
no
Johan Larsson
@JohanLarsson
Jun 21 2017 15:00
do you have r# installed? just a shot in the dark
Weston
@ronnyek
Jun 21 2017 15:00
no idea what you are referring to
I do
so squigglies arent a huge concern
Johan Larsson
@JohanLarsson
Jun 21 2017 15:00
try disabling it, could be the cause of the squiggles
Weston
@ronnyek
Jun 21 2017 15:00
but I should be able to get intellisense about say templates and stuff I am trying to override
assuming namespaces are imported properly etc
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:01
for me resharper doesn't do anythin in the designer
Johan Larsson
@JohanLarsson
Jun 21 2017 15:02
it does a lot
when writing wpf that is
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:02
yes, but for avalonia xaml
Johan Larsson
@JohanLarsson
Jun 21 2017 15:03
ah, ok, was just a guess
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:03
not even the camelhmps it normally does everywhere
i love what r# does for xaml in wpf ;)
Johan Larsson
@JohanLarsson
Jun 21 2017 15:08
yeah it is nice
Weston
@ronnyek
Jun 21 2017 15:08
so it looks like this TECHNICALLY supports themes and stuff
just not the wpf specific themes
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:10
correct
it practically supports themes as well... ;)
Weston
@ronnyek
Jun 21 2017 15:10
practically?
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:11
in your App.xaml, if you remove the StyleIncludes, you dont have an active theme..
Weston
@ronnyek
Jun 21 2017 15:13
oh ok
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:13
there's only 1 built-in theme, but the theming is actively being used.
Weston
@ronnyek
Jun 21 2017 15:15
k
Weston
@ronnyek
Jun 21 2017 15:25
if infact i can build a little app, then publish it for windows, publish it for linux like @kekekeks said, (and I dont have any reason to believe this ISNT possible)
I'll deal with some slight differences from wpf
Matthijs ter Woord
@mterwoord
Jun 21 2017 15:47
that's possible
even pblish to raspberry that way
MonkAlex
@MonkAlex
Jun 21 2017 17:53
How to do itemscontrol horizontal with vertical scrollbar?
I try
<ItemsPanelTemplate>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Horizontal"></StackPanel>
</ScrollViewer>
</ItemsPanelTemplate>
but ScrollViewer do not implement IPanel.
Steven Kirk
@grokys
Jun 21 2017 17:55
@MonkAlex ItemsControl can't have a scrollbar unless you re-template it - this is the same as WPF
Johan Larsson
@JohanLarsson
Jun 21 2017 17:56
in w2pf you put the ScrollViewer in the template and the StackPanel in the ItemsPanelTemplate
Nikita Tsukanov
@kekekeks
Jun 21 2017 18:04
@mterwoord The problem with intellisense is that we don't have a proper XAML parser
That's capable of building AST
and has support for error recovery
So right now we are using custom XML parser that gives some info about current cursor position
And speculate around that
MonkAlex
@MonkAlex
Jun 21 2017 18:05
So, i stupid, but how to do horizontal itemscontrol?
This, as example - http://lh3.ggpht.com/-RAReDFXxzRA/UFM4QmMl1eI/AAAAAAAAAys/c5vdYPPjgG0/image_thumb.png?imgmax=800
Nikita Tsukanov
@kekekeks
Jun 21 2017 18:05
If you want to improve intellysense, it's probably better to look at https://github.com/kekekeks/Avalonia.Ide
I've extracted intellisense-related code from VS extension to a separate lib
extension isn't using it yet, but I'm planning to finish the process
oh, just saw the screenshot - for that you'll use a WrapPanel as the panel
MonkAlex
@MonkAlex
Jun 21 2017 18:12
Yey, wrap panel help. Ty _