From: Xianbing Teng Date: Tue, 7 Dec 2021 09:15:41 +0000 (+0800) Subject: Add XNames for Element X-Git-Tag: submit/tizen_6.5/20220318.151238~1^2~5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2502a16bcf17b2291cae0bc27c5274f465456e0;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Add XNames for Element --- diff --git a/src/Tizen.NUI/src/public/XamlBinding/Element.cs b/src/Tizen.NUI/src/public/XamlBinding/Element.cs index 79f4f7f..d4b9409 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/Element.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/Element.cs @@ -222,6 +222,12 @@ namespace Tizen.NUI.Binding } } + /// + /// Gets the x:Name dictionary of the element. + /// + [EditorBrowsable(EditorBrowsableState.Never)] + public Dictionary XNames => (GetNameScope() as NameScope)?.XNames ?? null; + void IElement.RemoveResourcesChangedListener(Action onchanged) { if (changeHandlers == null) diff --git a/src/Tizen.NUI/src/public/XamlBinding/Internals/NameScope.cs b/src/Tizen.NUI/src/public/XamlBinding/Internals/NameScope.cs index 62cfa26..1823b75 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/Internals/NameScope.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/Internals/NameScope.cs @@ -85,5 +85,8 @@ namespace Tizen.NUI.Binding.Internals } bindable.SetValue(NameScopeProperty, value); } + + [EditorBrowsable(EditorBrowsableState.Never)] + public Dictionary XNames => names; } }