none
How to add GridSplitters silently to a ItemsControl RRS feed

  • Question

  • Hi All,

     

    I want to add several GridSplitter to a ItemsControl, So I have to use Grid as the ItemsPanel. But there comes two difficult problems:

    1.       How to modify the Grid’s RowDefinitions at run time automatically, since Grid uses this kind of information to arrange its children?

    2.       How to insert GridSplitter silently between two Items in this ItemsControl?

     

    Do you guys have any hints for these two questions? Any advice are warmly appreciated!

    Thursday, September 4, 2008 2:53 PM

Answers

  • I would recommend you to write your own GridSplitter which is not so hard to implement if you already have System.Windows.Controls.Primitives.Thumb at hand.

    Thanks
    • Marked as answer by Marco Zhou Tuesday, September 23, 2008 4:17 AM
    Wednesday, September 10, 2008 7:59 AM
  • hi,

    I had this problem too. The best way to do that is like Marco Zhou said writing your own GridSplitter to have more control
    What I did in my case is I placed rulers beside the Parent Grid which allow me to create GridSplitter on desired position.
    So with this concept, you are able to do more things like moving, deleting or adding Gridsplitter.


    • Marked as answer by Marco Zhou Tuesday, September 23, 2008 4:17 AM
    Wednesday, September 10, 2008 11:09 AM

All replies

  • I don't think Grid is a good candidate for ItemsPanel, please try elaborating with UniformGrid or WrapPanel.

    Thanks
    Monday, September 8, 2008 6:28 AM
  • Thanks for your reply! But Gridsplitter doesn't work in UniformGrid or WrapPanel. So how should  I add splitter for ItemsControl silently? Thanks again!
    • Edited by PaulTan Tuesday, September 9, 2008 4:48 AM typo error
    Tuesday, September 9, 2008 3:56 AM
  • I would recommend you to write your own GridSplitter which is not so hard to implement if you already have System.Windows.Controls.Primitives.Thumb at hand.

    Thanks
    • Marked as answer by Marco Zhou Tuesday, September 23, 2008 4:17 AM
    Wednesday, September 10, 2008 7:59 AM
  • hi,

    I had this problem too. The best way to do that is like Marco Zhou said writing your own GridSplitter to have more control
    What I did in my case is I placed rulers beside the Parent Grid which allow me to create GridSplitter on desired position.
    So with this concept, you are able to do more things like moving, deleting or adding Gridsplitter.


    Wednesday, September 10, 2008 11:09 AM
  • hi,

    I had this problem too. The best way to do that is like Marco Zhou said writing your own GridSplitter to have more control
    What I did in my case is I placed rulers beside the Parent Grid which allow me to create GridSplitter on desired position.
    So with this concept, you are able to do more things like moving, deleting or adding Gridsplitter.


    • Marked as answer by Marco Zhou Tuesday, September 23, 2008 4:17 AM
    Wednesday, September 10, 2008 11:09 AM