Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/Controls/src/Core/ContentPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,11 @@ static async void OnContentChanged(BindableObject bindable, object oldValue, obj
newView.ParentOverride = await TemplateUtilities.FindTemplatedParentAsync((Element)bindable);
}
}


// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding MeasureOverride.
protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
{
return this.ComputeDesiredSize(widthConstraint, heightConstraint);
Expand All @@ -118,6 +122,17 @@ Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double he
return this.MeasureContent(widthConstraint, heightConstraint);
}

// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding OnSizeAllocated.
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
}

// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding ArrangeOverride.
protected override Size ArrangeOverride(Rect bounds)
{
Frame = this.ComputeFrame(bounds);
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
3 changes: 3 additions & 0 deletions src/Controls/src/Core/PublicAPI/net/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
#nullable enable
override Microsoft.Maui.Controls.ScrollView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.TemplatedView.OnSizeAllocated(double width, double height) -> void
override Microsoft.Maui.Controls.ContentPresenter.OnSizeAllocated(double width, double height) -> void
16 changes: 16 additions & 0 deletions src/Controls/src/Core/ScrollView/ScrollView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,11 @@ void IScrollView.RequestScrollTo(double horizontalOffset, double verticalOffset,
}

void IScrollView.ScrollFinished() => SendScrollFinished();


// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding MeasureOverride.
protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
{
return this.ComputeDesiredSize(widthConstraint, heightConstraint);
Expand Down Expand Up @@ -459,13 +463,25 @@ Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double he
content.Measure(widthConstraint, heightConstraint);
return content.DesiredSize;
}


// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding ArrangeOverride.
protected override Size ArrangeOverride(Rect bounds)
{
Frame = this.ComputeFrame(bounds);
Handler?.PlatformArrange(Frame);

return Frame.Size;
}

// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding OnSizeAllocated.
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
}

Size ICrossPlatformLayout.CrossPlatformArrange(Rect bounds)
Expand Down
17 changes: 16 additions & 1 deletion src/Controls/src/Core/TemplatedView/TemplatedView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,10 @@ partial void OnApplyTemplateImpl()
{
Handler?.UpdateValue(nameof(IContentView.Content));
}


// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding MeasureOverride.
protected override Size MeasureOverride(double widthConstraint, double heightConstraint)
{
return this.ComputeDesiredSize(widthConstraint, heightConstraint);
Expand All @@ -137,6 +140,18 @@ Size ICrossPlatformLayout.CrossPlatformMeasure(double widthConstraint, double he
return this.MeasureContent(widthConstraint, heightConstraint);
}

// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding OnSizeAllocated.
protected override void OnSizeAllocated(double width, double height)
{
base.OnSizeAllocated(width, height);
}


// Don't delete this override. At some point in the future we'd like to delete Compatibility.Layout
// and this is the only way to ensure binary compatibility with code that's already compiled against MAUI
// and is overriding ArrangeOverride.
protected override Size ArrangeOverride(Rect bounds)
{
Frame = this.ComputeFrame(bounds);
Expand Down
Loading