These are chat archives for AvaloniaUI/Avalonia

14th
Nov 2018
nicolasr75
@nicolasr75
Nov 14 2018 00:36
Both thumbs up :-)
soerendd
@soerendd
Nov 14 2018 06:29
@nicolasr75 does it run at a decent speed? I also plan to build a rich ui for the raspberry. Is the deployment easy?
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 09:34
I get exception when using <NumericUpDown FormatString="{0:N2} °"/>
Unhandled Exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Reflection.Tar
getInvocationException: Exception has been thrown by the target of an invocation. ---> Portable.Xaml.XamlParseException: Failed to parse type name '0:
N2'
   at Portable.Xaml.ParsedMarkupExtensionInfo.Parse()
Steven Kirk
@grokys
Nov 14 2018 09:40
@wieslawsoltes try escaping your { and } with \ - Portable.Xaml has some bugs around {} in binding strings
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 09:40
try escaping your { and } with \
does not work
I get \N2 °
Steven Kirk
@grokys
Nov 14 2018 09:41
oh :(
i think you'll have to open an issue over at https://github.com/cwensley/Portable.Xaml/
cc: @cm4ker :point_up:
this used to work. i wonder if it was https://github.com/cwensley/Portable.Xaml/pull/106/commits/9b64c414b2b8abe6dd8d13519aacfbc58e7834b6 that, in trying to fix it, broke this case?
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 09:46
@grokys Actually FormatString="{}{0:N2} °" works :smile:
Steven Kirk
@grokys
Nov 14 2018 09:49
oh cool! so looks like it fixed that case but broke the escaping case ;)
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 09:50
now I have nice NumericUpDown for my color picker :fire:
my style is getting lower priority
        <Style Selector="NumericUpDown.picker /template/ TextBox#PART_TextBox">
            <Setter Property="Margin" Value="4"/>
        </Style>
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 09:55
Bez tytułu.png
Steven Kirk
@grokys
Nov 14 2018 09:57
from the screenshot, looks like "NumericUpDown.picker /template/ TextBox#PART_TextBox" has the highest priority within styles but the local value in the template is overriding it
i wish i could think of a way for local values in templates to be converted to style priority
i should maybe look some more into that
it's more difficult than it sounds though...
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 10:03
should we create issue ?
TemplatedControl. should be removed ?
I am also getting black instead of white current when using dark theme for NumericUpDown
the TextBox gets white current when using dark theme
Steven Kirk
@grokys
Nov 14 2018 10:23
yeah , please do create an issue! we can discuss it there
yep, TemplatedControl. should be removed
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 10:24
I am working on NumericUpDown tmeplate and will submit changes
cm4ker
@cm4ker
Nov 14 2018 10:25
@wieslawsoltes Hi there!
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 10:25
hi
cm4ker
@cm4ker
Nov 14 2018 10:25
I checked you issue in Portable.Xaml
It's the same behavor System.Xaml
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 10:27
ah ok, did not test this with WPF, good news is that sequence espacing {} is working in my case :smile:
cm4ker
@cm4ker
Nov 14 2018 10:28
yea this was fixed
Steven Kirk
@grokys
Nov 14 2018 10:29
sorry, looks like it was my mistake then, because only \ escaping used to work
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 10:29
@cm4ker we can close the issue
cm4ker
@cm4ker
Nov 14 2018 10:49
@wieslawsoltes anyway thanks for open the issue)
nicolasr75
@nicolasr75
Nov 14 2018 10:50
@soerendd I have not yet seen any performance issues on the RPI but I have not really done any long running tests. What I have experienced are redraw and font issues. The latter should be solved in the current Avalonia codes.
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 11:07
Steven Kirk
@grokys
Nov 14 2018 11:10
thanks!
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 11:12
I really want DataGrid integrated with devtools with editable properties :fire:
danwalmsley
@danwalmsley
Nov 14 2018 11:15
perhaps DataGrid should be in main repo?
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 11:15
this was discussed few days ago
danwalmsley
@danwalmsley
Nov 14 2018 11:15
ah :)
Jumar Macato
@jmacato
Nov 14 2018 11:17
@danwalmsley im planning to do the integration later
will fire up a PR for it
danwalmsley
@danwalmsley
Nov 14 2018 11:18
cool
Andrey Kunchev
@donandren
Nov 14 2018 11:37
@jmacato nice, after datagrid is merged in main stream, i can spend some time and integrate it in editable properties devtools pr AvaloniaUI/Avalonia#2017
Nikita Tsukanov
@kekekeks
Nov 14 2018 11:59
      <StyleInclude Source="res://Avalonia.Themes.Default/DefaultTheme.xaml"/>
      <StyleInclude Source="res://Avalonia.Themes.Default/Accents.DefaultTheme.xaml"/>
      <Image Source="/Assets/delicate-arch-896885_640.jpg"/>
      <Image Source="res:/Assets/delicate-arch-896885_640.jpg"/>
Looks much nicer now, I think
Especially with relative urls support
Nikita Tsukanov
@kekekeks
Nov 14 2018 12:16
Well, actually, we are stuck with ?assembly =
Actually, <StyleInclude Source="res:asm:Avalonia.Themes.Default/DefaultTheme.xaml"/> should work ok
nicolasr75
@nicolasr75
Nov 14 2018 12:19
@danwalmsley sorry, I just found that you asked for the libSkiaSharp that I had built for ARM devices back in September. Here it is: https://github.com/nicolasr75/libSkiaSharpArm
Jumar Macato
@jmacato
Nov 14 2018 12:20
@kekekeks that functionality's merged already?
Nikita Tsukanov
@kekekeks
Nov 14 2018 12:25
WIP
Jumar Macato
@jmacato
Nov 14 2018 12:26
awesome :)
Steven Kirk
@grokys
Nov 14 2018 12:50
@donandren if you do that could you base devtools on https://github.com/grokys/devtools? the code is a bit more modern. the current devtools comes from a time before we even had XAML!
Nikita Tsukanov
@kekekeks
Nov 14 2018 13:36
Extra bonus: XAML file can now be anywhere in the project
And codebehind can have any namespace
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 13:42
nice
Nikita Tsukanov
@kekekeks
Nov 14 2018 13:42
@Gillibald FontFamilyLoader lacks baseUri info
So it won't be able to load fonts like any other resource is loaded
Wiesław Šoltés
@wieslawsoltes
Nov 14 2018 13:54
ColorPicker.PNG
ColorPicker control with NumericUpDown (needs: AvaloniaUI/Avalonia#2103)
Benedikt Stebner
@Gillibald
Nov 14 2018 14:00
@kekekeks Should be easy to add. Don't know why I used absolute paths. Introducing a baseUri would make it clearer where to look for font files. Relative uris would point to a specific file I guess. What kind of behavior do you need?
Nikita Tsukanov
@kekekeks
Nov 14 2018 14:32
You can test new uri syntax if you want
@Gillibald
            <TextBox FontFamily="res:asm:ControlCatalog/Assets/Fonts#Source Sans Pro"/>
            <TextBox FontFamily="res:asm:ControlCatalog/Assets/Fonts#Source Sans Pro"/>
            <TextBox FontFamily="res:asm:ControlCatalog/Assets/Fonts/SourceSansPro-Italic.ttf#Source Sans Pro"/>
            <TextBox FontFamily="res:asm:ControlCatalog/Assets/Fonts/SourceSansPro-*.ttf#Source Sans Pro"/>
For now this syntax works
I had to change the way you are getting resource lists
For some reason you were formatting Uris on FontLoader side
Nikita Tsukanov
@kekekeks
Nov 14 2018 15:13
@danwalmsley UpdateXamlMessage got extended with XamlFileProjectPath field
Which should be a project-rooted path
/Views/SomeView.xaml
That will be needed for relative paths to work
danwalmsley
@danwalmsley
Nov 14 2018 15:15
ok thanks
danwalmsley
@danwalmsley
Nov 14 2018 15:24
just experimenting with ways we can improve the UI
and noticed that its difficult to contain a borders contents when you have corner radius set..
i.e.
image.png
Should it be possible that the containing border has ClipToBounds=True
and with corner radius on the border the red box fits inside obeying the corners
Steven Kirk
@grokys
Nov 14 2018 15:29
yeah that's the same on WPF at least
does UWP have a solution for this? CSS?
danwalmsley
@danwalmsley
Nov 14 2018 15:30
was just checking wpf and indeed that is the case
will try uwp now
Nikita Tsukanov
@kekekeks
Nov 14 2018 15:32
We could add ClipToRoundCorners and do some geometry clip magic in Border and ContentControl
danwalmsley
@danwalmsley
Nov 14 2018 15:33
uwp does this
image.png
and UWP doesn't have ClipToBounds property either
:eyes:
I added an issue
danwalmsley
@danwalmsley
Nov 14 2018 15:42
@kekekeks whats happening to the hipster friendly language server branch of Avalonia.ide
will it get merged?
Nikita Tsukanov
@kekekeks
Nov 14 2018 15:42
I think we should merge it to master
danwalmsley
@danwalmsley
Nov 14 2018 16:02
that pr updates it with master and fixes the merge.
Nikita Tsukanov
@kekekeks
Nov 14 2018 16:04
@danwalmsley wrong target branch, I think
danwalmsley
@danwalmsley
Nov 14 2018 16:05
master?
Nikita Tsukanov
@kekekeks
Nov 14 2018 16:05
mergedd
danwalmsley
@danwalmsley
Nov 14 2018 16:06
ok
Benedikt Stebner
@Gillibald
Nov 14 2018 17:16
Will add a BaseUri to FontFamilyKey when AvaloniaUI/Avalonia#2104 is merged
Benedikt Stebner
@Gillibald
Nov 14 2018 21:27
Is it possible to define a opacity mask for a control? That could probably help with rounded corners.
Kermalis
@Kermalis
Nov 14 2018 21:34
Can I create a bitmap from a uri?
Kermalis
@Kermalis
Nov 14 2018 21:46
nvm, I found BitmapTypeConverter
Kermalis
@Kermalis
Nov 14 2018 21:51
actually that's crashing and seems clunky, is there another way?