Ejemplo n.º 1
0
        /// <summary>
        /// Set focus to item which has specific data index.
        /// </summary>
        /// <param name="dataIndex">Data index of item.</param>
        /// <param name="animated">If set true, scroll to item using animation.</param>
        /// <since_tizen> 8 </since_tizen>
        /// This may be public opened in tizen_6.0 after ACR done. Before ACR, need to be hidden as inhouse API
        public void SetFocus(int dataIndex, bool animated)
        {
            foreach (RecycleItem item in Children)
            {
                if (item.DataIndex == dataIndex)
                {
                    RecycleItem prevFocusedItem = FocusedItem;
                    prevFocusedItem?.OnFocusLost();
                    FocusedItem = item;
                    FocusedItem.OnFocusGained();

                    ScrollTo(item.DataIndex * mLayoutManager.StepSize, animated);
                }
            }
        }
Ejemplo n.º 2
0
        private void OnScrollDragStarted(object source, ScrollEventArgs args)
        {
            RecycleItem prevFocusedItem = FocusedItem;

            prevFocusedItem?.OnFocusLost();
        }