|
|
@ -216,7 +216,7 @@ namespace Avalonia.Controls |
|
|
get |
|
|
get |
|
|
{ |
|
|
{ |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
if (_data.ColumnDefinitions == null) { _data.ColumnDefinitions = new ColumnDefinitions(); } |
|
|
if (_data.ColumnDefinitions == null) { _data.ColumnDefinitions = new ColumnDefinitions() { Parent = this }; } |
|
|
|
|
|
|
|
|
return (_data.ColumnDefinitions); |
|
|
return (_data.ColumnDefinitions); |
|
|
} |
|
|
} |
|
|
@ -224,6 +224,7 @@ namespace Avalonia.Controls |
|
|
{ |
|
|
{ |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
_data.ColumnDefinitions = value; |
|
|
_data.ColumnDefinitions = value; |
|
|
|
|
|
_data.ColumnDefinitions.Parent = this; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -235,7 +236,7 @@ namespace Avalonia.Controls |
|
|
get |
|
|
get |
|
|
{ |
|
|
{ |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
if (_data.RowDefinitions == null) { _data.RowDefinitions = new RowDefinitions(); } |
|
|
if (_data.RowDefinitions == null) { _data.RowDefinitions = new RowDefinitions() { Parent = this }; } |
|
|
|
|
|
|
|
|
return (_data.RowDefinitions); |
|
|
return (_data.RowDefinitions); |
|
|
} |
|
|
} |
|
|
@ -243,6 +244,7 @@ namespace Avalonia.Controls |
|
|
{ |
|
|
{ |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
if (_data == null) { _data = new ExtendedData(); } |
|
|
_data.RowDefinitions = value; |
|
|
_data.RowDefinitions = value; |
|
|
|
|
|
_data.RowDefinitions.Parent = this; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -769,20 +771,20 @@ namespace Avalonia.Controls |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Convenience accessor to ValidDefinitionsUStructure bit flag.
|
|
|
/// Convenience accessor to ValidDefinitionsUStructure bit flag.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
internal bool ColumnDefinitionsDirty |
|
|
internal bool ColumnDefinitionsDirty |
|
|
{ |
|
|
{ |
|
|
get { return (!CheckFlagsAnd(Flags.ValidDefinitionsUStructure)); } |
|
|
get => ColumnDefinitions?.IsDirty ?? false; |
|
|
set { SetFlags(!value, Flags.ValidDefinitionsUStructure); } |
|
|
set => ColumnDefinitions.IsDirty = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Convenience accessor to ValidDefinitionsVStructure bit flag.
|
|
|
/// Convenience accessor to ValidDefinitionsVStructure bit flag.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
internal bool RowDefinitionsDirty |
|
|
internal bool RowDefinitionsDirty |
|
|
{ |
|
|
{ |
|
|
get { return (!CheckFlagsAnd(Flags.ValidDefinitionsVStructure)); } |
|
|
get => RowDefinitions?.IsDirty ?? false; |
|
|
set { SetFlags(!value, Flags.ValidDefinitionsVStructure); } |
|
|
set => RowDefinitions.IsDirty = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
//------------------------------------------------------
|
|
|
//------------------------------------------------------
|
|
|
@ -944,23 +946,10 @@ namespace Avalonia.Controls |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
foreach(var definition in extData.DefinitionsU |
|
|
|
|
|
?? Enumerable.Empty<DefinitionBase>()) |
|
|
|
|
|
definition.OnExitParentTree(); |
|
|
|
|
|
|
|
|
|
|
|
extData.DefinitionsU = extData.ColumnDefinitions; |
|
|
extData.DefinitionsU = extData.ColumnDefinitions; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// adds index information.
|
|
|
|
|
|
for(int i = 0; i < extData.DefinitionsU.Count;i++) |
|
|
|
|
|
{ |
|
|
|
|
|
var definition = extData.DefinitionsU[i]; |
|
|
|
|
|
definition.Parent = this; |
|
|
|
|
|
definition.Index = i; |
|
|
|
|
|
definition.OnEnterParentTree(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ColumnDefinitionsDirty = false; |
|
|
ColumnDefinitionsDirty = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -997,24 +986,11 @@ namespace Avalonia.Controls |
|
|
extData.DefinitionsV = new DefinitionBase[] { new RowDefinition() }; |
|
|
extData.DefinitionsV = new DefinitionBase[] { new RowDefinition() }; |
|
|
} |
|
|
} |
|
|
else |
|
|
else |
|
|
{ |
|
|
{ |
|
|
foreach(var definition in extData.DefinitionsV |
|
|
|
|
|
?? Enumerable.Empty<DefinitionBase>()) |
|
|
|
|
|
definition.OnExitParentTree(); |
|
|
|
|
|
|
|
|
|
|
|
extData.DefinitionsV = extData.RowDefinitions; |
|
|
extData.DefinitionsV = extData.RowDefinitions; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// adds index information.
|
|
|
|
|
|
for(int i = 0; i < extData.DefinitionsV.Count;i++) |
|
|
|
|
|
{ |
|
|
|
|
|
var definition = extData.DefinitionsV[i]; |
|
|
|
|
|
definition.Parent = this; |
|
|
|
|
|
definition.Index = i; |
|
|
|
|
|
definition.OnEnterParentTree(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
RowDefinitionsDirty = false; |
|
|
RowDefinitionsDirty = false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|