Longhorn style Breadcrumb Bar

Anyone have an idea for how to implement a Longhorn style "breadcrumb bar" in C# for Windows Forms  Basically, the idea is:

- A parent window that can spawn child windows of the same style. The child windows will append their title/location to the breadcrumb bar. (i.e. "Parent Title -> Child Title")

- If you click on one of the crumbs in it you navigate to that location in-place (like most web page breadcrumb bars) 

- When you mouse over the crumbs, the right pointing arrow turns to a down pointing one. Clicking on it gives you a popup menu of other locations at that level with the current one highlighted in bold. 

The idea is to make navigation of an inductive user interface stateful. 

Here is an <a href="http://msdn.microsoft.com/library/default.asp url=/library/en-us/dnaero/html/cb_recipe_patientdb.asp">example</a>

Thanks,
Mark Richman


Answer this question

Longhorn style Breadcrumb Bar

  • CMCFelix

    How will you handle (or how does Longhorn handle) the case where you have dirty data on the current form/view/control, and you go 'back' without saving
  • fcsobel

    I am working on something similar for the SmartLibrary, I never knew that it’s named “breadcrumb”, and it looks like the name is official after published on MSDN.

    My idea is to place an extender on an existing form, the extender will change the form theme to one similar in Longhorn, the extender also must implementing the additional controls that the form have (the back button, next button, 2 titles (main, and sub (I must convert the sub title to a “breadcrumb” once I know who it exactly works), the search button, and 2 additional custom buttons).

    But all of that may take about a month, because I am developing more than one control at the same time.

  • Dan Straw

    I am still using a text label instead of the bar until I finish with the design of the form, but the idea is having a tree structure in the memory to represent all nodes, every node is linked with a tab in the form, imagine something like a tab control with multiple pages, and something like the tree control that is hidden and linked to those pages pages, and to trace where you ware is just a simple collection class that stores references to the opened tabs.

    This is of course the idea, it’s still not working yet  :)   

    This idea may also increase the size of the form dramatically, because one form basically will store all the sub forms as tabs, I may change that later to let the user link the tree with existing forms, and the forms will be open when necessary, but this means more code from my side, and maybe more problems with the implementation.

    Anyway, I still have a month to try; my personal deadline is before the end of this year.

  • GlennG

    How are you maintaining navigation state in a winforms app, with respect to "where you are" and "where you were", etc.

    If you look at that PatientDB Longhorn example, you'll see its not a web app.

  • aminoplacid

    I've been thinking of how to do the same thing. My plan is as follows:

    - To exactly replicate the Longhorn breadcrumb bar looks like it would involve alot of owner draw stuff, so I was going to cheat and create a control that manages a alternating set of LinkLabels and PictureBoxes with arrows in them left-docked within a panel.  The LinkLabels would also have context menus. If I feel adventerous I'll add left-right scrolling too.

    - I'm thinking I'll do the "pages" instantiating User Controls at runtime.

    - For the objects that tie these two together, I'm hoping to find inspiration in the MSAvalon.Windows.Navigation namespace of the Longhorn SDK. 

    http://longhorn.msdn.microsoft.com/ //longhorn.msdn.microsoft.com/lhsdk/ref/msavalon.windows.navigation.aspx

  • Longhorn style Breadcrumb Bar