Please start using our more robust New Forum, we have put this old forum in archive mode. Thanks.

Welcome Guest Search | Active Topics | Log In

Tag as favorite
Changing Chart Start time and Chart End time like in Microsoft Project
#1 Posted : Monday, June 30, 2014 4:33:36 AM

Posts: 6


I need to change rendering of Gantt Chart. Now it's splits on different pages. Chart start time and end time changeing by clicking buttons "page left" and "page right".

I want this function will be like in Microsoft Project:
1. Gantt Chart doesn't split on different pages
2. There is no buttons "page left" and "page right"
3. Chart end time change to future date by scrolling scroll bar to the right of the scrolable area.
4. Chart start time moving to previous dates by scrolling scroll bar to the left of the scrolable area.

How can I do it?
#2 Posted : Monday, June 30, 2014 12:52:05 PM

Posts: 469


Yes, you can do this to hide the Pager buttons and make the scroll bar left and right buttons shift the gantt chart's AnchorTime:


        void ganttControl_TemplateApplied(object sender, EventArgs e)
            this.ganttControl.GanttChart.Loaded += GanttChart_Loaded;

        void GanttChart_Loaded(object sender, RoutedEventArgs e)
            // Hide the pager buttons.
            this.ganttControl.GanttChart.TimeScaleShiftLeftButton.Visibility = System.Windows.Visibility.Hidden;
            this.ganttControl.GanttChart.TimeScaleShiftRightButton.Visibility = System.Windows.Visibility.Hidden;

            // Get hold of the scrollbar and listen to it's left and right button click events.
            ScrollBar hozSB = Extensions.GetChild<ScrollBar>(this.ganttControl.GanttChart.ScrollViewerElement, true);
            List<RepeatButton> buttons = new List<RepeatButton>();
            Extensions.GetChildren<RepeatButton>(hozSB, ref buttons, false, true);

            RepeatButton leftBtn = null, rightBtn = null;
            foreach (RepeatButton button in buttons)
                if (button.Name == "PART_LineLeftButton")
                    leftBtn = button;
                if (button.Name == "PART_LineRightButton")
                    rightBtn = button;

            if (leftBtn != null)
                leftBtn.Click += leftBtn_Click;

            if (rightBtn != null)
                rightBtn.Click += rightBtn_Click;
        void rightBtn_Click(object sender, RoutedEventArgs e)
            if(this.ganttControl.GanttChart.ScrollViewerElement.HorizontalOffset == this.ganttControl.GanttChart.ScrollViewerElement.ScrollableWidth)
                this.ganttControl.GanttChart.AnchorTime += TimeSpan.FromDays(7);

        void leftBtn_Click(object sender, RoutedEventArgs e)
            if(this.ganttControl.GanttChart.ScrollViewerElement.HorizontalOffset == 0)
                this.ganttControl.GanttChart.AnchorTime -= TimeSpan.FromDays(7);

#3 Posted : Wednesday, November 01, 2017 2:12:43 AM

Posts: 2
Location: china

If you are lucky enough to pandora christmas charms sale find a rare "perf van cleef and arpels replicas ect" recipe for all pandora christmas charms sale training goals. provide van cleef and arpels replicas the tricks of the fitness recipes, "basa T pandora rings uk stores ofu pandora rings uk stores Pot" easy raw material . for beginners, a total of 510 kcal The different choice o
Tag as favorite
Forum Jump  
Please Email for any issues

ugg boots outlet cheap ugg sale ugg boots clearance ugg boots sale ugg boots cheap ugg boots for women uggs for cheap ugg shops cheap ugg boots cheap uggs Official Ugg Outlet ugg Store Buy Cheap UGGs ugg boots uk ugg boots usa ugg Online uggs on sale ugg outlets cheap ugg boot Discount UGG Boots discount uggs