MonoMobile.Views.BaseDialogViewSource.ResetIndexPathRow C# (CSharp) Method

ResetIndexPathRow() public method

public ResetIndexPathRow ( NSIndexPath indexPath ) : NSIndexPath
indexPath NSIndexPath
return NSIndexPath
		public NSIndexPath ResetIndexPathRow(NSIndexPath indexPath)
		{
			var listCount = 0;

			var listSource = GetListSource(NSIndexPath.FromRowSection(0, indexPath.Section));
			if (listSource != null && !listSource.IsRootCell)
			{
				listCount = listSource.Sections[0].DataContext.Count;
			
				if (indexPath.Row >= listCount)
					indexPath = NSIndexPath.FromRowSection(indexPath.Row - listCount + 1, indexPath.Section);
			}

			return indexPath;
		}