Browse Source

Fix Grid not reacting to cell structure changes during runtime.

pull/3131/head
Dariusz Komosinski 7 years ago
parent
commit
91662d7020
  1. 11
      src/Avalonia.Controls/Grid.cs

11
src/Avalonia.Controls/Grid.cs

@ -24,13 +24,14 @@ namespace Avalonia.Controls
{ {
static Grid() static Grid()
{ {
IsSharedSizeScopeProperty.Changed.AddClassHandler<Control>(DefinitionBase.OnIsSharedSizeScopePropertyChanged);
ShowGridLinesProperty.Changed.AddClassHandler<Grid>(OnShowGridLinesPropertyChanged); ShowGridLinesProperty.Changed.AddClassHandler<Grid>(OnShowGridLinesPropertyChanged);
ColumnProperty.Changed.AddClassHandler<Grid>(OnCellAttachedPropertyChanged); IsSharedSizeScopeProperty.Changed.AddClassHandler<Control>(DefinitionBase.OnIsSharedSizeScopePropertyChanged);
ColumnSpanProperty.Changed.AddClassHandler<Grid>(OnCellAttachedPropertyChanged); ColumnProperty.Changed.AddClassHandler<Control>(OnCellAttachedPropertyChanged);
RowProperty.Changed.AddClassHandler<Grid>(OnCellAttachedPropertyChanged); ColumnSpanProperty.Changed.AddClassHandler<Control>(OnCellAttachedPropertyChanged);
RowSpanProperty.Changed.AddClassHandler<Grid>(OnCellAttachedPropertyChanged); RowProperty.Changed.AddClassHandler<Control>(OnCellAttachedPropertyChanged);
RowSpanProperty.Changed.AddClassHandler<Control>(OnCellAttachedPropertyChanged);
AffectsParentMeasure<Grid>(ColumnProperty, ColumnSpanProperty, RowProperty, RowSpanProperty); AffectsParentMeasure<Grid>(ColumnProperty, ColumnSpanProperty, RowProperty, RowSpanProperty);
} }

Loading…
Cancel
Save