From: AdunFang Date: Fri, 9 Jun 2023 01:34:05 +0000 (+0900) Subject: [NUI] Fix issue when user try to get Children of ScrollableBase instance as View X-Git-Tag: submit/tizen/20230614.040614~1^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=787e5cdadc5bd37f1d7792d01da6f86c229ff04b;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] Fix issue when user try to get Children of ScrollableBase instance as View --- diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index ae694727d..74b678ada 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -1114,6 +1114,16 @@ namespace Tizen.NUI.Components } } + /// + /// return the children of ContentContainer when user try to get the children of ScrollableBase. + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected override List GetChildren() + { + return ContentContainer.Children; + } + /// /// Scrolls to the item at the specified index. /// diff --git a/src/Tizen.NUI/src/public/Common/Container.cs b/src/Tizen.NUI/src/public/Common/Container.cs index 13577bf0c..823ca55af 100755 --- a/src/Tizen.NUI/src/public/Common/Container.cs +++ b/src/Tizen.NUI/src/public/Common/Container.cs @@ -107,7 +107,7 @@ namespace Tizen.NUI { get { - return childViews; + return GetChildren(); } } @@ -326,6 +326,16 @@ namespace Tizen.NUI OnResourcesChanged(changedResources); } + /// + /// Some type which inherit from Container overwrite the Add/Remove, so the getter of children should also be overwrite. + /// + /// + [EditorBrowsable(EditorBrowsableState.Never)] + protected virtual List GetChildren() + { + return childViews; + } + /// /// Invoked whenever the binding context of the element changes. Implement this method to add class handling for this event. ///