This is a migrated thread and some comments may be shown as answers.

Defaulting to Max Height

2 Answers 138 Views
GanttView
This is a migrated thread and some comments may be shown as answers.
Nathan
Top achievements
Rank 1
Nathan asked on 08 Jul 2014, 09:55 PM

For my GanttView, I'm having an issue where the GanttView is defaulting to the MaxHeight property ( which I set through XAML to 700).
But for some datasets, this leaves a bunch of wasted, white space under the last node.

How do I get it such that the height of the GanttView is what is necessary up to a maximum of 700?

2 Answers, 1 is accepted

Sort by
0
Nathan
Top achievements
Rank 1
answered on 09 Jul 2014, 05:14 PM
Adding on, I noticed that when MaxHeight is not set, the GanttView will dynamically resize its height as I collapse and expand nodes.  When MaxHeight is set, that functionality is lost.  Is there a way to keep that functionality when MaxHeight is set?

Am I misunderstanding what MaxHeight is meant to do?    I interpreted it as the GanttView can be of height 0 < x <=MaxHeight, not Height = MaxHeight.
0
Polya
Telerik team
answered on 10 Jul 2014, 03:33 PM
Hi Nathan,

The described behavior is caused by our internal implementation of Telerik.Windows.Controls.GanttPresenterPanel. This panel is used as a RadGanttView placeholder. It manages, measures and arranges the GridView part, TimeRuler part, scrollbars, etc. It appears that the MaxHeight property is used as height for the GanttPresenterPanel parts if the Height property is not set.
To allow the RadGanttView to size itself correctly with MaxHeight set, I suggest modifying the GanttItemsPresenterTemplate to place the GanttPresenterPanel inside a Grid with MaxHeight set for its Row. Please find attached a sample project demonstrating this approach. Note that the project uses Implicit Styles.

Please give it a try and let me know whether this is an applicable for your scenario. Looking forward to your reply.

Regards,
Polya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
GanttView
Asked by
Nathan
Top achievements
Rank 1
Answers by
Nathan
Top achievements
Rank 1
Polya
Telerik team
Share this question
or