Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
125
Group position
posted

 How do I change the specific position of a group or move it up and down among other groups at run-time? I thought of changing the index but it's ready-only. I have OutlookNavigationPane as View Style.

Parents
  • 2677
    Verified Answer
    posted

    Hello,

     There is no nice method or property to set on the ExlorerBarGroups that will allow you to move the groups around.  If you would like to see this functionality implemented, please submit a Feature Request for this functionality. 

    However, there is a way via the ExlorerBar Groups collection to remove and insert a group.  This is not the best solution, but it will work.  Below is a simple prototype of what I tested.  I created a MoveExplorerBarGroups method that takes a group and and index.  On the click of a button, I take a group in the ExporerBar and an arbitrary index and call the MoveExplorerBarGroups with that information.  Then I take that group and insert it into the specified index using remove and insert methods.  This seemed to work ok.  I hope this will work for you. 

    private void MoveExplorerBarGroups(UltraExplorerBarGroup group, int index)

    {

    this.ultraExplorerBar1.Groups.Remove(group);this.ultraExplorerBar1.Groups.Insert(index, group);

    }

    private void button1_Click(object sender, EventArgs e)

    {

    MoveExplorerBarGroups(this.ultraExplorerBar1.Groups[2], 0);

    }

Reply Children