From 787e5cdadc5bd37f1d7792d01da6f86c229ff04b Mon Sep 17 00:00:00 2001 From: AdunFang Date: Fri, 9 Jun 2023 10:34:05 +0900 Subject: [PATCH] [NUI] Fix issue when user try to get Children of ScrollableBase instance as View --- src/Tizen.NUI.Components/Controls/ScrollableBase.cs | 10 ++++++++++ src/Tizen.NUI/src/public/Common/Container.cs | 12 +++++++++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index ae69472..74b678a 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -1115,6 +1115,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. /// /// Index of item. diff --git a/src/Tizen.NUI/src/public/Common/Container.cs b/src/Tizen.NUI/src/public/Common/Container.cs index 13577bf..823ca55 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(); } } @@ -327,6 +327,16 @@ namespace Tizen.NUI } /// + /// 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. /// /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. -- 2.7.4