These are chat archives for AvaloniaUI/Avalonia

14th
Mar 2016
danwalmsley
@danwalmsley
Mar 14 2016 13:42
@grokys I know you are away, but on Virtualization... this article has some great classes I use for data virtualization, perhaps it can be adapted for Item virtualization... http://www.codeproject.com/Articles/34405/WPF-Data-Virtualization
Steven Kirk
@grokys
Mar 14 2016 14:02
hi all, i'm back
@danwalmsley yeah - i was thinking of including support for that too
danwalmsley
@danwalmsley
Mar 14 2016 14:04
@grokys I couldn't remember if you'd said 4 days or 4weeks
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 14:04
@grokys Hi. Seems I finished with Grid. At least I think so, BTW, I found out that GridSplitter was completely broken and I fixed it)
Steven Kirk
@grokys
Mar 14 2016 14:05
4 days or 4 weeks that i was away?
danwalmsley
@danwalmsley
Mar 14 2016 14:05
yeh
Steven Kirk
@grokys
Mar 14 2016 14:05
4 weeks - i wish
danwalmsley
@danwalmsley
Mar 14 2016 14:05
@QuantumDeveloper any chance of a sneak preview?
ah i was thinking you said DataGrid
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 14:05
no)
datagrid is too complex for me now)
I saw it has 8000 lines in WPF sources)
Steven Kirk
@grokys
Mar 14 2016 14:06
@danwalmsley to use a property in a selector us do e.g. Border[Foo=bar]
like in CSS
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 14:07
@grokys I will update my fork in the evening. A;so will add 23 Grid tests
Steven Kirk
@grokys
Mar 14 2016 14:07
cool
danwalmsley
@danwalmsley
Mar 14 2016 14:08
@QuantumDeveloper grid is basically used everywhere so this could be a significant performance update?
@grokys thanks for that
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 14:08
@danwalmsley it should.
basically it should work much faster because I dont use exponential algorithm
danwalmsley
@danwalmsley
Mar 14 2016 14:54
let me know when you have your branch pushed i'll run a few tests on my application and see how it runs
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 14:55
ок
@grokys should I also fix GridSplitter?
Steven Kirk
@grokys
Mar 14 2016 14:56
sure. also if you could do it in a separate branch as a separate PR that would be really nice
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 14:58
ok. I can add some more functionality to it. As in WPF splitter I have added GridResizeBehavior
public enum GridResizeBehavior
   {
      PreviosAndNext = 1,
      PreviosAndCurrent = 2,
      CurrentAndNext = 3
   }
and DeferredResizing
should I include this also?
Steven Kirk
@grokys
Mar 14 2016 15:01
sounds good - except you've spelt "Previous" wrong ;)
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 15:02
will fix that)
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 15:06
@QuantumDeveloper Does you fix for GridSplitter fixes this issue: https://github.com/Perspex/Perspex/issues/324#issuecomment-167007543
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 15:31
@wieslawsoltes yes and no)
there is no such issue which shown in that bug, but there is still some issues present
but I think that is related not to the gridsplitter, but to grid
will look into that issue
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 15:33
that would be great
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 15:47
@wieslawsoltes well, I think I have fixed that
btw, in WPF such grid also resizes very strange
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 15:52

@wieslawsoltes well, I think I have fixed that

That was fast

Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 15:54
yeah, I found one bug in splitter itself and think that now it works much better than shown in your gif)
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 15:54
nice
well the Perspex did not have GridResizeBehavior
setting this in WPF should help defining correct behavior
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 15:57
I will introduce that property
Darnell Williams
@Seeker1437
Mar 14 2016 15:58
Yaaay
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:10

btw, in WPF such grid also resizes very strange

I would say its broken

Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:11
yeah, WPF grid has some strange issue during resining and behaves strange in some situations (not as expected)
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:21
very strange, I have tried setting fixed sizes and its still broken I think (this is WPF XAML)
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="540" Height="540">
        <Grid.RowDefinitions>
            <RowDefinition Height="540"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="100"/>
        </Grid.ColumnDefinitions>
        <Rectangle Grid.Row="0" Grid.Column="0" Fill="Purple"/>
        <GridSplitter Background="LightGray" Width="10" Grid.Row="0" Grid.Column="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext"/>
        <Rectangle Grid.Row="0" Grid.Column="2" Fill="Red"/>
        <GridSplitter Background="LightGray" Width="10" Grid.Row="0" Grid.Column="3" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext"/>
        <Rectangle Grid.Row="0" Grid.Column="4" Fill="Green"/>
        <GridSplitter Background="LightGray" Width="10" Grid.Row="0" Grid.Column="5" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext"/>
        <Rectangle Grid.Row="0" Grid.Column="6" Fill="Blue"/>
        <GridSplitter Background="LightGray" Width="10" Grid.Row="0" Grid.Column="7" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext"/>
        <Rectangle Grid.Row="0" Grid.Column="8" Fill="Orange"/>
    </Grid>
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:22
so, you mean that WPF Grid/gridSplitter is broken?
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:23
according to docs PreviousAndNext For a vertical GridSplitter, space is redistributed between the columns that are to the left and right of the column that is specified for the GridSplitter.
this does not look like GS is respecting this rule
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:24
this could be Grid itself
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:24
I would have doubts if Grid was using Auto or * columns, but this example is based on fixed widths
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:25
you just didnt see Grid sources) There could be anything
just checked my GridSplitter implementation - everything resizes correctly with fixed columns
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:30
wow
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:30
I think this is Grid issue actually, because my Splitter has a lot common with WPF splitter
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:31
So this means the WPF grid issue ?
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:31
I think yes
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:31
maybe its how splitter manipulates grid properties
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 16:32
I think you right
Wiesław Šoltés
@wieslawsoltes
Mar 14 2016 16:33
using simpler example
    <Grid HorizontalAlignment="Center" VerticalAlignment="Center" Width="210" Height="540">
        <Grid.RowDefinitions>
            <RowDefinition Height="540"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="100"/>
            <ColumnDefinition Width="10"/>
            <ColumnDefinition Width="100"/>
        </Grid.ColumnDefinitions>
        <Rectangle Grid.Row="0" Grid.Column="0" Fill="Purple"/>
        <GridSplitter Background="LightGray" Width="10" Grid.Row="0" Grid.Column="1" ResizeDirection="Columns" ResizeBehavior="PreviousAndNext"/>
        <Rectangle Grid.Row="0" Grid.Column="2" Fill="Red"/>
    </Grid>
I would say both column widths should change when moving splitter, not only the left column
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 17:55
haha
I also reproduced that splitter behaviour with my splitter
And I know why it behaves so)
Also I can fix that
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 18:03
and I think we should introduce anotherGridSplitter behaviour property for WPF-like and Non-WPF
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 18:09
but I am not sure in that
from Grid point of view everything seems logic
No, I think we should leave it like in WPF, because it other case there will be another issues related to resizing
Denis Zaporozhets
@QuantumDeveloper
Mar 14 2016 18:17
any way, I will experiment with it a little