public static string CreateSubParagraphId(CheckListElement paragraph) { StringBuilder builder = new StringBuilder(); builder.Append(paragraph.Id); builder.Append("."); builder.Append(paragraph.Children?.Count + 1); return(builder.ToString()); }
private void SelectCheckListElement(CheckListElement element) { var tvi = TreeView.ItemContainerGenerator.ContainerFromItemRecursive(element); if (tvi != null) { tvi.IsSelected = true; } }
public static string CreateParagraphInSectionId(CheckListElement section) { var id = section.Children?.Count ?? 0; return((id + 1).ToString()); }
private void RefreshCheckListSection(CheckListElement element) { TreeViewItem tvi = TreeView.ItemContainerGenerator.ContainerFromItemRecursive(element); tvi?.Items.Refresh(); }