Skip to content

Commit

Permalink
[Tizen] Handle ContentViews and templated content in new layout system
Browse files Browse the repository at this point in the history
  • Loading branch information
rookiejava authored and myroot committed Aug 24, 2022
1 parent d3aaad5 commit b963ba4
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions src/Core/src/Handlers/Page/PageHandler.Tizen.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Tizen.UIExtensions.Common;
using Tizen.UIExtensions.Common;
using EColor = ElmSharp.Color;

namespace Microsoft.Maui.Handlers
Expand Down Expand Up @@ -28,29 +28,6 @@ protected override ContentCanvas CreatePlatformView()

public override void NativeArrange(Graphics.Rectangle frame)
{
// empty on purpose
}

void UpdateContent()
{
_ = NativeView ?? throw new InvalidOperationException($"{nameof(NativeView)} should have been set by base class.");
_ = VirtualView ?? throw new InvalidOperationException($"{nameof(VirtualView)} should have been set by base class.");
_ = MauiContext ?? throw new InvalidOperationException($"{nameof(MauiContext)} should have been set by base class.");

NativeView.Children.Clear();
_contentHandler?.Dispose();
_contentHandler = null;

if (VirtualView is IContentView cv && cv.Content is IView view)
{
NativeView.Children.Add(view.ToNative(MauiContext));

if (view.Handler is INativeViewHandler thandler)
{
thandler?.SetParent(this);
_contentHandler = thandler;
}
}
}
}
}

0 comments on commit b963ba4

Please sign in to comment.