These are chat archives for AvaloniaUI/Avalonia

16th
Nov 2018
cm4ker
@cm4ker
Nov 16 2018 07:13
Hi! You guys using Portable.Xaml so much. Have Portable.Xaml some missing features you are need?
ahopper
@ahopper
Nov 16 2018 07:20
I know the performance is already good but even faster would be great: )
cm4ker
@cm4ker
Nov 16 2018 07:33
@ahopper I think try to reanimate the JsonReader \Writer. It's 1.5x times faster than XML ^_^
ahopper
@ahopper
Nov 16 2018 07:35
I read something recently about microsoft adding super fast json to .netcore
there might be some ideas there that could be used for xaml
Nikita Tsukanov
@kekekeks
Nov 16 2018 07:40
The main thing we are missing in Portable.Xaml and the one that will probably never be implemented there
Is error recovery
We need to consume incomplete XAML for purposes of auto-completion engine
But it's not like System.Xaml provides it
cm4ker
@cm4ker
Nov 16 2018 07:44
Maybe compliteon can be handled in the separate library from the XAML-engine. AFAIK in system.xaml has separate services for this.
Nikita Tsukanov
@kekekeks
Nov 16 2018 07:46
We currently have a simple xml parser that tries to use context information it has
But that's it
no proper object model is built for the document
Jeremy Koritzinsky
@jkoritzinsky
Nov 16 2018 08:40
@cm4ker I think @grokys has a list. He started to implement a System.Xaml backend for us a while back just for fun and I think he found some things that were missing in Portable.Xaml.
ahopper
@ahopper
Nov 16 2018 09:27
has anyone got a work around for the having to build twice issue?
Benedikt Schroeder
@Gillibald
Nov 16 2018 12:05
I just do not build Avalonia.csproj
Nikita Tsukanov
@kekekeks
Nov 16 2018 12:44
@grokys it seems that my code was combining Uri's in a wrong way
new Uri(new Uri("res:asm:ControlCatalog/Some/File/Path.xml"), new Uri("/Test.xaml", UriKind.Relative))
Gives res:asm:/Test.xaml
And ignores assembly part
It also looks like that pack: uris in WPF aren't uris at all
At lease Mono gives me UriFormatException
Wiesław Šoltés
@wieslawsoltes
Nov 16 2018 12:57
ColorPicker-CMYK.PNG
More work on ColorPicker control :smile:
Sanan R. Fataliyev
@sanan-fataliyev
Nov 16 2018 13:25
👍
Benedikt Schroeder
@Gillibald
Nov 16 2018 13:48
Pack uris are just a sequence of components that is translated to "real" uri before it is used.
Nikita Tsukanov
@kekekeks
Nov 16 2018 13:49
It has a custom UriParser settings, actually
Benedikt Schroeder
@Gillibald
Nov 16 2018 13:56
I guess by evaluating the original uri's scheme you know what kind of target you have. Anything else is either a absolute uri or a combination of base and relative uri. OriginalUri(OriginalString) would also have the assembly info I guess. Could be totally wrong what I am writing.
Nikita Tsukanov
@kekekeks
Nov 16 2018 13:57
pack:// uris are using GenericAuthority flag for their Uri parser
that allows to place anything between pack:// and the first /
So they can have ,,,,,: and uppercase letters there
With default parsing settings you can't have that
Authority part will be changed to lowercase
That's why we can't use res://ControlCatalog/some/path
it will be converted to res://controlcatalog/some/path
To override that we need to register a custom Uri parser
but res: scheme is too common
So I've decided to use avares://ControlCatalog/some/path
Benedikt Schroeder
@Gillibald
Nov 16 2018 15:13
So that syntax always expects an assembly as the first element and if you specify just a path the baseUit of the current context is used?
Btw writing on gitter on a phone is a pain...
Nikita Tsukanov
@kekekeks
Nov 16 2018 15:22

and if you specify just a path the baseUit of the current context is used

new Uri(relativeUri, baseUri) is used

danwalmsley
@danwalmsley
Nov 16 2018 16:46
@grokys, @kekekeks @jkoritzinsky , @jmacato iv added a PR to fix the IBeam cursor on textboxes, currently it only shows the IBeam when the mouse is over actual text, and you cant override it with styles either.
if someone can have a quick gander :)
ahopper
@ahopper
Nov 16 2018 17:01
is there a reason why the textbox does not respect the insert key and have an overwrite mode? wpf does but strangely the cursor does not change.
Jeremy Koritzinsky
@jkoritzinsky
Nov 16 2018 17:29
I don’t know if we’ve implemented an insert mode
ahopper
@ahopper
Nov 16 2018 17:41
it isn't, just wondered if there was a reason, it would obviously make styling the cursor more tricky
perhaps an :overwritemode pseudoclass
ahopper
@ahopper
Nov 16 2018 17:50
just realized this Ibeam cursor is different to the actual textbox cursor so I've been talking nonsense :)