Silverlight: GridSplitter with a collapse button – BEST

I don’t remember where I took this control from.
It is not my work so I cannot take credit for it.
I have only fixed some stuff and made some changes to the animation.
This is by far the BEST version of this control! Use this one!
All credits goes to the anonymous developer who made it.
it should go into the Toolkit.

Demo is here
source is here

About these ads

17 Responses to Silverlight: GridSplitter with a collapse button – BEST

  1. It looks to me like you did it:

    http://shemesh.wordpress.com/2008/11/18/silverlight-gridsplitter-with-a-collapse-button/

    got that from a search at SilverlightCream

    -Dave

    • shemesh says:

      well.. me too have written a version of this control which you can see here in oldest posts.
      but this version of the Grid Splitter I did not write.
      I have found it somewhere and been using it since then.
      it is the best version.

  2. Andy says:

    Shemesh,

    How would I get my column to automatically collapse at application launch time? Right now it is expanded by default. Thanks …

    Andy

    • James says:

      Andy, did you find a way to manage this? I have recently found and started using this control and am faced with the same problem. Anybody else have a suggestion?

      • Andy says:

        Not yet, but I shelved it for a while when I couldn’t figure it out. I just started looking at it again yesterday. I’ll let you know if I have a breakthrough, but hopefully someone else out there has skinned this cat and will let us know how it’s done.

      • Andy says:

        James,

        This code seems to work, but only after everything has been loaded – like on a button click or something. I get weird results when trying to put it in the main page loaded event, but I think I’m on the right track.

        gsTabTools.GridSplitterButton_Checked(this, null);
        gsTabTools.IsCollapsed = true;

  3. Jeff says:

    This is exactly what I was looking for except…

    I wish I could use this in WPF (.NET 3.5) but so far after attempting to port it I ran into an issue because GridSplitter doesn’t implement the Visual States in .NET 3.5 because VSM is only available within the WPF Toolkit. Also I think there maybe other compatibility issues with the port because I’m not even seeing the button in my splitter.

    I’ve started the following StackOverflow question in order to see if I could figure out an implementation that will work for .NET 3.5.

    http://stackoverflow.com/questions/3673987/gridsplitter-with-button-for-pinning-like-behavior

  4. Pingback: GridExpander for WPF « freekinputer

  5. Burhan Farooq says:

    Hi,
    I am using your control..
    The issue i am facing while changing the default behaviour in your given sample is:

    On changing the CollapseMode=”Previous” for vertical splitter in demo code, the splitter seems to go out of view when dragged to right area of browser window.

    The weird issue occure when once you click the collapse/expand button.

    can you check if this is bug or i need to change any other property.

    Thanks.

  6. Andrew says:

    Is there a way to expand/collapse the gridsplitter from the click event of another control?

    • Andy says:

      Here’s the code I use to expand it programmatically. gsTabTools is the name of the grid splitter …

      if (gsTabTools.IsCollapsed)
      {
      gsTabTools.GridSplitterButton_Unchecked(sender, e);
      }

  7. Andrew says:

    Andy,

    No dice. Basically I have a method that runs and at the completion if the grid splitter is not expanded, I want it to expand. (I changed my UI slightly from a button click as my previous post eluded to).

    I can easily enough use the “isCollapsed” property to check the state of the splitter, but if it is Collapsed (returns True) how can I expand it? It’d be nice to have an expand method but there doesn’t seem to be one.

    Thanks,
    Andrew

  8. hiteshagja says:

    I must say fantastic ! I have not used it in my project till now but it will be very helpful to me in very near term. I am very happy seeing your blog post and I appreciate your efforts. You are taking active interest to make it more beautiful.

  9. Adam says:

    Hi! Thanks very much for posting this code! It’s exactly what I needed in the project I am working on. I am completely stuck on one thing though. I want two panes (on the right and left) and for some reason the pane on the right still has the pane below it. What is needed to remove the place holder for the bottom right pane? There appears to be a ghost pane or something.

  10. Pingback: Silverlight Gridsplitter | Adam Estrada

  11. Bahadır EKİCİ says:

    Thx so much..!

  12. hamadtou says:

    Hi,
    How can I load the page with the gridsplitter collapsed. in the demo its expanded on loadpage
    many thanks

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: