public void RemoveTo(BreadcrumbControl item) { var index = Breadcrumbs.IndexOf(item); while (Breadcrumbs.Count > index + 1) { Breadcrumbs.RemoveAt(index + 1); } }
private void RemoveParentOf(BreadcrumbControl breadcrumb) { var index = Breadcrumbs.IndexOf(breadcrumb); if (index > 0) { Breadcrumbs.RemoveAt(index - 1); } }
private int GetInsertPosition(BreadcrumbControl breadcrumb) { var index = Breadcrumbs.IndexOf(breadcrumb); if (index < 0) { index = 0; } return(index); }