These are chat archives for AvaloniaUI/Avalonia

1st
May 2018
walterlv
@walterlv
May 01 2018 02:39
@danwalmsley @grokys I find some bugs in the WPF Grid layout. I didn't even find it out before I tried to write our own GridLayout.
I'm writing document comment and trying to improve the performance of our own GridLayout.
@lindexi and I write it together.
Jeremy Koritzinsky
@jkoritzinsky
May 01 2018 03:17
@walterlv just to confirm, none of the code in your PR came from the WPF source and you didn’t copy and reimplement their algorithms + bug fixes correct? It’s a completely clean-room implementation?
walterlv
@walterlv
May 01 2018 03:38
@jkoritzinsky Even I've read the layout code of Avalonia and WPF, My friend @lindexi and I still have discussed and figure out the whole new layout algorithm which is totally different from the existed ones.
So, please rest assured!
Jeremy Koritzinsky
@jkoritzinsky
May 01 2018 03:39
Perfect 👌
Just wanted to make sure we wouldn't have legal issues.
walterlv
@walterlv
May 01 2018 03:40
I understand that
walterlv
@walterlv
May 01 2018 04:13
@jkoritzinsky Can we discuss some behaviors of the new Grid Layout? See here: https://github.com/AvaloniaUI/Avalonia/pull/1517/files#diff-19b1d9482b002c64722fd1950649f846R352
Jeremy Koritzinsky
@jkoritzinsky
May 01 2018 04:14
I'm actually getting ready for bed. It's almost midnight here and I just got back from traveling today. Toss some comments on the PR and I'll take a look when I have time!
walterlv
@walterlv
May 01 2018 04:15
OK! Good night!
danwalmsley
@danwalmsley
May 01 2018 07:47
@walterlv are all the unit tests passing?
I'll try your branch with Avalon Studio which has quite a large visual tree and lots of grids
See if everything still works
walterlv
@walterlv
May 01 2018 07:49
@danwalmsley Unfortunately, there was only one unit test for Grid. But other unit tests passed.
I'm writing more unit test for the Grid layout
And I'm making them all pass.
@danwalmsley I'm afraid that the grid still has some bugs and I'm fixing it.
I recommended you to try it hours later.
danwalmsley
@danwalmsley
May 01 2018 07:57
Ok
walterlv
@walterlv
May 01 2018 07:59
Good! ^_^
danwalmsley
@danwalmsley
May 01 2018 08:45
@grokys iv finally found a repro and the cause of AvaloniaUI/Avalonia#1326
treeview-selection.gif
when the binding fails to update the selecteditem on the data context
AvalonStudio Warning: 0 : Binding: Error in binding to "Avalonia.Controls.TreeView"."SelectedItem": "Could not convert 'AvalonStudio.Controls.Standard.SolutionExplorer.SolutionFolderViewModel' to 'ProjectItemViewModel'."
then this selection issue happens
I think I could fix it, but id like to know if you think warnings like this should or shouldn't affect if the control itself continues to function correctly?
walterlv
@walterlv
May 01 2018 09:16
image.png
@danwalmsley The performance test result is posted in the pr
AvaloniaUI/Avalonia#1517
How to test the GC performance?
Sergey Khabibullin
@x2bool
May 01 2018 15:18

Hey! Does anyone know how to make Images with round corners (circle masked image)?

<Ellipse
    Width="20"
    Height="20"
    IsVisible="{Binding HasAvatar}"
    Grid.Column="0"
    >
    <Ellipse.Fill>
        <ImageBrush Source="{Binding Avatar}" />
    </Ellipse.Fill>
</Ellipse>

I came up with this. But it renders only top-left quarter of the image (no matter what is the size of the original image). Any ideas how to fix this?

Benedikt Schroeder
@Gillibald
May 01 2018 16:43
Is the resm scheme the only way to access embedded resources? I have to figure out how we can define typefaces in xaml. Currently I just point to single ttf file
Jeremy Koritzinsky
@jkoritzinsky
May 01 2018 16:54
Currently yes. There's discussion of creating a new scheme that supports "directories" in the main Custom Fonts issue.