From 42a364b536546aa2ad03933e50a3e4d3ecb7cb3d Mon Sep 17 00:00:00 2001 From: Yeongjong Lee Date: Thu, 3 Dec 2020 14:50:45 +0900 Subject: [PATCH] [NUI] fix exception when Theme.Resource is used in xaml file Since local value `xamlFile` is set after `LoadFromXaml()`, `xamlFile` is always null in `Reload()`. To fix this exception, it sets `xamlFile` before `XamlLoader.Load()`. --- src/Tizen.NUI/src/public/Theme/Theme.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Tizen.NUI/src/public/Theme/Theme.cs b/src/Tizen.NUI/src/public/Theme/Theme.cs index bd40598..436362c 100644 --- a/src/Tizen.NUI/src/public/Theme/Theme.cs +++ b/src/Tizen.NUI/src/public/Theme/Theme.cs @@ -82,7 +82,6 @@ namespace Tizen.NUI } LoadFromXaml(xamlFile); - this.xamlFile = xamlFile; } /// @@ -105,7 +104,6 @@ namespace Tizen.NUI XamlResources.SetAndLoadSource(new Uri(themeResource), themeResource, Assembly.GetAssembly(GetType()), null); LoadFromXaml(xamlFile); - this.xamlFile = xamlFile; } /// @@ -329,6 +327,7 @@ namespace Tizen.NUI { using (var reader = XmlReader.Create(xamlFile)) { + this.xamlFile = xamlFile; XamlLoader.Load(this, reader); } } -- 2.7.4