Inheritance: System.Windows.Controls.Control
Example #1
0
        private void GenerateRows(Size finalSize)
        {
            //MessageBox.Show(new System.Diagnostics.StackTrace().ToString());
            if (!RowsValid && (_oldSize != finalSize || !ignoreSameSize))
            {
                _oldSize = finalSize;

                if (RowPresenter == null)
                {
                    return;
                }

                RowsValid = true;
                RowPresenter.Children.Clear();

                double height = finalSize.Height;


                for (double i = 0; i < height; i += RowHeight)
                {
                    GanttRow row = new GanttRow
                    {
                        ParentPanel        = this,
                        BorderBrush        = this.ParentGanttChart.GanttRowBorderBrush,
                        GapBackgroundBrush = this.GapBackgroundBrush,
                        GapBorderBrush     = this.GapBorderBrush
                    };

                    this.RowPresenter.Children.Add(row);
                }

                ResetRows();
            }
        }
Example #2
0
        private GanttRow CreateRow()
        {
            GanttRow row = new GanttRow();

            row.BorderBrush = BorderBrush;
            row.Background  = Background;
            row.ParentPanel = this;
            return(row);
        }
Example #3
0
        private void ResetRows()
        {
            if (RowPresenter == null)
            {
                return;
            }

            for (int i = 0; i < RowPresenter.Children.Count; i++)
            {
                GanttRow row = RowPresenter.Children[i] as GanttRow;
                row.BorderBrush  = ParentGanttChart.GanttRowBorderBrush;
                row.Background   = Background;
                row._sameSizeCnt = 1;

                if (i + TopNodeIndex < Nodes.Count)
                {
                    row.Node = Nodes[i + TopNodeIndex];
                }
                else
                {
                    row.Node = null;
                }
            }
        }
Example #4
0
        private void GenerateRows(Size finalSize)
        {
            //MessageBox.Show(new System.Diagnostics.StackTrace().ToString());
            if (!RowsValid && (_oldSize != finalSize || !ignoreSameSize))
            {
                _oldSize = finalSize;

                if (RowPresenter == null)
                    return;

                RowsValid = true;
                RowPresenter.Children.Clear();

                double height = finalSize.Height;

                for (double i = 0; i < height; i += RowHeight)
                {
                    GanttRow row = new GanttRow
                    {
                        ParentPanel = this,
                        BorderBrush = this.ParentGanttChart.GanttRowBorderBrush,
                        GapBackgroundBrush = this.GapBackgroundBrush,
                        GapBorderBrush = this.GapBorderBrush
                    };

                    this.RowPresenter.Children.Add(row);
                }

                ResetRows();
            }
        }
Example #5
0
 private GanttRow CreateRow()
 {
     GanttRow row = new GanttRow();
     row.BorderBrush = BorderBrush;
     row.Background = Background;
     row.ParentPanel = this;
     return row;
 }