summaryrefslogtreecommitdiff
path: root/Xamarin.Forms.Core/Application.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Xamarin.Forms.Core/Application.cs')
-rw-r--r--Xamarin.Forms.Core/Application.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/Xamarin.Forms.Core/Application.cs b/Xamarin.Forms.Core/Application.cs
index ac9aa1b1..e089cf88 100644
--- a/Xamarin.Forms.Core/Application.cs
+++ b/Xamarin.Forms.Core/Application.cs
@@ -10,7 +10,7 @@ namespace Xamarin.Forms
public class Application : Element, IResourcesProvider, IApplicationController, IElementConfiguration<Application>
{
static Application s_current;
- readonly Task<IDictionary<string, object>> _propertiesTask;
+ Task<IDictionary<string, object>> _propertiesTask;
readonly Lazy<PlatformConfigurationRegistry<Application>> _platformConfigurationRegistry;
IAppIndexingProvider _appIndexProvider;
@@ -30,7 +30,6 @@ namespace Xamarin.Forms
Loader.Load();
NavigationProxy = new NavigationImpl(this);
Current = this;
- _propertiesTask = GetPropertiesAsync();
SystemResources = DependencyService.Get<ISystemResourcesProvider>().GetSystemResources();
SystemResources.ValuesChanged += OnParentResourcesChanged;
@@ -94,7 +93,15 @@ namespace Xamarin.Forms
public IDictionary<string, object> Properties
{
- get { return _propertiesTask.Result; }
+ get
+ {
+ if (_propertiesTask == null)
+ {
+ _propertiesTask = GetPropertiesAsync();
+ }
+
+ return _propertiesTask.Result;
+ }
}
internal override ReadOnlyCollection<Element> LogicalChildrenInternal