Defaulting to Max Height

3 posts, 0 answers
  1. Nathan
    Nathan avatar
    7 posts
    Member since:
    Jun 2014

    Posted 08 Jul 2014 Link to this post


    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. Nathan
    Nathan avatar
    7 posts
    Member since:
    Jun 2014

    Posted 09 Jul 2014 Link to this post

    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.
  3. UI for WPF is Visual Studio 2017 Ready
  4. Polya
    Admin
    Polya avatar
    199 posts

    Posted 10 Jul 2014 Link to this post

    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.
     
Back to Top