From: Yeongjong Lee Date: Thu, 3 Dec 2020 05:50:45 +0000 (+0900) Subject: [NUI] fix exception when Theme.Resource is used in xaml file X-Git-Tag: accepted/tizen/unified/20210219.040944~210 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=42a364b536546aa2ad03933e50a3e4d3ecb7cb3d;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [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()`. --- 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); } }