/// <summary>
        /// 如果需要,创建初始的 UI 元素。
        /// </summary>
        private void UpdateVisualTree()
        {
            if (this.NeedUpdateVisualTree)
            {
                var internalChildren = base.UIChildren;
                internalChildren.Clear();

                foreach (var column in base.Columns)
                {
                    var summary = new TreeGridColumnSummary();
                    summary.Column      = column;
                    summary.DataContext = column;
                    summary.SetBinding(TreeGridColumnSummary.SummaryTextProperty, TreeGridColumn.SummaryProperty);
                    summary.IsSummaryVisible = column.NeedSummary;

                    internalChildren.Add(summary);
                }

                //在所有列后添加一个 _paddingSummary。
                this._paddingSummary = new TreeGridColumnSummary();
                internalChildren.Add(this._paddingSummary);

                //把 rowTitle 添加为最后一个元素。
                var grid = this.TreeGrid;
                this._summaryRowTitle = new TextBlock
                {
                    Text  = grid.SummaryRowTitle,
                    Style = grid.SummaryRowTitleStyle
                };
                internalChildren.Add(this._summaryRowTitle);

                this.NeedUpdateVisualTree = false;
            }
        }
        /// <summary>
        /// 如果需要,创建初始的 UI 元素。
        /// </summary>
        private void UpdateVisualTree()
        {
            if (this.NeedUpdateVisualTree)
            {
                var internalChildren = base.UIChildren;
                internalChildren.Clear();

                foreach (var column in base.Columns)
                {
                    var summary = new TreeGridColumnSummary();
                    summary.Column = column;
                    summary.DataContext = column;
                    summary.SetBinding(TreeGridColumnSummary.SummaryTextProperty, TreeGridColumn.SummaryProperty);
                    summary.IsSummaryVisible = column.NeedSummary;

                    internalChildren.Add(summary);
                }

                //在所有列后添加一个 _paddingSummary。
                this._paddingSummary = new TreeGridColumnSummary();
                internalChildren.Add(this._paddingSummary);

                //把 rowTitle 添加为最后一个元素。
                var grid = this.TreeGrid;
                this._summaryRowTitle = new TextBlock
                {
                    Text = grid.SummaryRowTitle,
                    Style = grid.SummaryRowTitleStyle
                };
                internalChildren.Add(this._summaryRowTitle);

                this.NeedUpdateVisualTree = false;
            }
        }