зеркало из https://github.com/DeGsoft/maui-linux.git
* Fixed problem disposing childs navigating back * Fixed text format
This commit is contained in:
Родитель
b25ca40edb
Коммит
9ffa2f12c7
|
@ -1,5 +1,6 @@
|
|||
using Gtk;
|
||||
using System;
|
||||
using System.Collections.ObjectModel;
|
||||
using System.ComponentModel;
|
||||
using Xamarin.Forms.Internals;
|
||||
using Xamarin.Forms.Platform.GTK.Extensions;
|
||||
|
@ -82,26 +83,33 @@ namespace Xamarin.Forms.Platform.GTK.Renderers
|
|||
return Container.GetDesiredSize(widthConstraint, heightConstraint);
|
||||
}
|
||||
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
public override void Dispose()
|
||||
{
|
||||
base.Dispose();
|
||||
|
||||
if (!_disposed)
|
||||
{
|
||||
if (_appeared)
|
||||
{
|
||||
Page.SendDisappearing();
|
||||
}
|
||||
if (!_disposed)
|
||||
{
|
||||
if (_appeared)
|
||||
{
|
||||
ReadOnlyCollection<Element> children = ((IElementController)Element).LogicalChildren;
|
||||
for (var i = 0; i < children.Count; i++)
|
||||
{
|
||||
var visualChild = children[i] as VisualElement;
|
||||
visualChild?.Cleanup();
|
||||
}
|
||||
|
||||
_appeared = false;
|
||||
Page.SendDisappearing();
|
||||
}
|
||||
|
||||
Dispose(true);
|
||||
_appeared = false;
|
||||
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
Dispose(true);
|
||||
|
||||
protected override void OnShown()
|
||||
_disposed = true;
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnShown()
|
||||
{
|
||||
base.OnShown();
|
||||
|
||||
|
@ -125,7 +133,7 @@ namespace Xamarin.Forms.Platform.GTK.Renderers
|
|||
|
||||
_appeared = false;
|
||||
|
||||
PageController.SendDisappearing();
|
||||
PageController.SendDisappearing();
|
||||
}
|
||||
|
||||
protected override void OnSizeAllocated(Gdk.Rectangle allocation)
|
||||
|
|
Загрузка…
Ссылка в новой задаче