SpicyTaco / SpicyTaco.AutoGrid

A magical replacement for the built in WPF Grid and StackPanel
MIT License
76 stars 15 forks source link

RowSpan does not work properly. #10

Open spowner opened 6 years ago

spowner commented 6 years ago

When using complex row and column spans in table form, RowSpan does not work properly.

We have fixed the issue by modifying the following source code:

In PerformLayout ()

cellCount + = (ColumnDefinitions.Count! = 0)? Grid.GetColumnSpan (child): Grid.GetRowSpan (child); cellCount + = (ColumnDefinitions.Count! = 0)? Grid.GetRowSpan (child) - 1: Grid.GetColumnSpan (child) - 1; // added (add RowSpan to cellCount)

...

Enumerable.Range (1, rowSpan) .ToList () ... // before Enumerable.Range (1, rowSpan - 1) .ToList () ... // after

...

Enumerable.Range (1, columnSpan) .ToList () ... // before Enumerable.Range (1, columnSpan - 1) .ToList () ... // after

...

This change works well.

I usually write well. Thank you.

kmcginnes commented 6 years ago

I'll have to write a test around this scenario. Can you describe your layout in more detail?