protected virtual rMindHorizontalLine CreateHorizontalLine() { var line = new rMindHorizontalLine(this); bool first = m_horizontal_lines.Count == 0 && m_vertical_lines.Count == 0; if (!first) { Template.RowDefinitions.Add(new RowDefinition() { Height = GridLength.Auto, MinHeight = 24 }); foreach (var l in VLines) { foreach (var node in l.BottomNodes) { node.Row += 1; } } } m_horizontal_lines.Add(line); return(line); }
protected virtual void RemoveHorizontalLine(rMindHorizontalLine line) { var removeNodes = line.LeftNodes.Union(line.RightNodes).ToList(); var rowIdx = GetLineIndex(line); RemoveNodes(removeNodes); // Собираем узлы ниже OffsetNodes(true, rowIdx); if (Template.RowDefinitions.Count > 1) { Template.RowDefinitions.Remove( Template.RowDefinitions.Last() ); } HLines.Remove(line); }