Skip to content

Commit

Permalink
Support Min/Max Height/Width on IView and applying MauiApp/MauiAppBui…
Browse files Browse the repository at this point in the history
…lder pattern

- Support Min/Max Height/Width on IView (dotnet#2265)
- Updating .NET MAUI to use MauiApp/MauiAppBuilder pattern and use MS.Extensions.DependencyInjection (dotnet#2137)
  • Loading branch information
rookiejava authored and myroot committed Aug 25, 2022
1 parent 7717240 commit 7c662c4
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/Core/src/Platform/Tizen/MauiApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ protected MauiApplication()

protected override void OnPreCreate()
{
base.OnPreCreate();
get
{
IWindow? window = null;
_virtualWindow?.TryGetTarget(out window);
return window;
}
}

Elementary.Initialize();
Elementary.ThemeOverlay();
Expand All @@ -38,10 +44,11 @@ protected override void OnPreCreate()

Services = _applicationContext.Services;

if (Services == null)
throw new InvalidOperationException($"The {nameof(IServiceProvider)} instance was not found.");
var mauiApp = CreateMauiApp();

Services = mauiApp.Services;

Current.Services.InvokeLifecycleEvents<TizenLifecycle.OnPreCreate>(del => del(this));
Current.Services?.InvokeLifecycleEvents<TizenLifecycle.OnPreCreate>(del => del(this));
}

protected override void OnCreate()
Expand Down

0 comments on commit 7c662c4

Please sign in to comment.