Skip to content

Commit

Permalink
Bumt to latest
Browse files Browse the repository at this point in the history
- Effects (dotnet#1574)
- Improve Window and AnimationManager (dotnet#1653)
- and so on
  • Loading branch information
rookiejava committed Apr 8, 2022
1 parent 0b7ba76 commit 8b6f320
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Expand Up @@ -902,8 +902,8 @@ void OnFocusChangeRequested(object sender, VisualElement.FocusRequestArgs e)
/// <param name="effect">The effect to register.</param>
void OnRegisterEffect(PlatformEffect effect)
{
effect.SetContainer(Element.Parent == null ? null : Platform.GetRenderer(Element.Parent)?.NativeView);
effect.SetControl(NativeView);
effect.Container = Element.Parent == null ? null : Platform.GetRenderer(Element.Parent)?.NativeView;
effect.Control = NativeView;
}

void OnMoved(object sender, EventArgs e)
Expand Down
2 changes: 2 additions & 0 deletions src/Controls/src/Core/Platform/PlatformEffect.cs
Expand Up @@ -5,6 +5,8 @@
using PlatformView = Android.Views.View;
#elif WINDOWS
using PlatformView = Microsoft.UI.Xaml.FrameworkElement;
#elif TIZEN
using PlatformView = ElmSharp.EvasObject;
#elif NETSTANDARD
using PlatformView = System.Object;
#endif
Expand Down
8 changes: 4 additions & 4 deletions src/Core/src/Platform/Tizen/HandlerExtensions.cs
Expand Up @@ -6,7 +6,7 @@ namespace Microsoft.Maui
{
public static class HandlerExtensions
{
public static EvasObject ToNative(this IView view, IMauiContext context)
public static EvasObject ToNative(this IElement view, IMauiContext context)
{
_ = view ?? throw new ArgumentNullException(nameof(view));
_ = context ?? throw new ArgumentNullException(nameof(context));
Expand Down Expand Up @@ -44,12 +44,12 @@ public static void SetWindow(this Window nativeWindow, IWindow window, IMauiCont
_ = window ?? throw new ArgumentNullException(nameof(window));
_ = mauiContext ?? throw new ArgumentNullException(nameof(mauiContext));

var handler = window.Handler as IWindowHandler;
var handler = window.Handler;
if (handler == null)
handler = mauiContext.Handlers.GetHandler(window.GetType()) as IWindowHandler;
handler = mauiContext.Handlers.GetHandler(window.GetType());

if (handler == null)
throw new Exception($"Handler not found for view {window} or was not {nameof(IWindowHandler)}'");
throw new Exception($"Handler not found for view {window}.");

handler.SetMauiContext(mauiContext);

Expand Down

0 comments on commit 8b6f320

Please sign in to comment.