Browse Source

Merge pull request #3131 from MarchingCube/fix-grid-cell-properties

Fix Grid not reacting to cell structure changes during runtime.
pull/3143/head
Jumar Macato 7 years ago
committed by GitHub
parent
commit
2a2ddaaeaa
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  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