From 1cc28b5eddc942ef5d420e4dec7f5e9d412e35af Mon Sep 17 00:00:00 2001 From: jaehyun0cho Date: Thu, 6 Aug 2020 15:01:50 +0900 Subject: [PATCH] [NUI] Add ScrollPosition and ScrollCurrentPosition to ScrollableBase (#1845) To get the scroll position given to ScrollTo, ScrollPosition is added. ScrollPosition is the position in the opposite direction to the position of ContentContainer. To get the current scroll position, ScrollCurrentPosition is added. ScrollCurrentPosition is the position in the opposite direction to the current position of ContentContainer. Co-authored-by: Jaehyun Cho --- .../Controls/ScrollableBase.cs | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs index 3d623b3..bb43385 100755 --- a/src/Tizen.NUI.Components/Controls/ScrollableBase.cs +++ b/src/Tizen.NUI.Components/Controls/ScrollableBase.cs @@ -1081,6 +1081,31 @@ namespace Tizen.NUI.Components return position; } + /// + /// Scroll position given to ScrollTo. + /// This is the position in the opposite direction to the position of ContentContainer. + /// + /// 8 + public Position ScrollPosition + { + get + { + return new Position(-ContentContainer.Position); + } + } + + /// + /// Current scroll position in the middle of ScrollTo animation. + /// This is the position in the opposite direction to the current position of ContentContainer. + /// + /// 8 + public Position ScrollCurrentPosition + { + get + { + return new Position(-ContentContainer.CurrentPosition); + } + } } } // namespace -- 2.7.4