Breadcrumb Menu Alignment

Navigation for WPF Forum

Posted 16 years ago by Mike Strobel - New York, NY
Version: 3.5.0426
Avatar
If you look closely at the Vista Explorer breadcrumb bar, you will notice that when you toggle a context menu, the menu item text is left-aligned with the text in the breadcrumb item immediately to the right. It looks something like this:

+-+---------+-+---------+-+----------+-+---------+
|>| Level 1 |>| Level 2 |v| Level 3A |>| Level 4 |
+-+---------+-+---------+-+----------+-+---------+
                        |x| Level 3A |
                        | | Level 3B |
                        | | Level 3C |
                        | | Level 3D |
                        +-+----------+
                            ^
                            Left-Aligned
...where the menu item headers for 3A, 3B, 3C, and 3D are horizontally aligned with the 3A breadcrumb item header. Can this be implemented in the next release of Navigation for WPF? It should be fairly straightforward--I implemented this functionality myself in an open source breadcrumb on CodePlex.

Comments (2)

Posted 16 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Mike,

Thanks for the posting.

We have just added a new property called MenuHorizontalOffset that allows you to adjust the menu offset as needed. This property is now set based on the theme currently loaded for the Breadcrumb control, since the various themes for ContextMenus will need different adjustments.

With that said, the problem with the Vista context menus is that we need to align two things. First, we want to align the menu's icon divider with the right side of the button. And second, we want to align the text as you have pointed out. By default, the Breadcrumb now handles both correctly for all themes. But if you provide a custom DataTemplate by setting MenuItemTemplate or MenuItemExpandedTemplated, then you will need to include a 2-pixel margin on the left side. The Breadcrumb samples have been updated to show how the margin needs to be set.

These changes will appear in the next maintenance release.


Actipro Software Support

Posted 16 years ago by Mike Strobel - New York, NY
Avatar
Sounds great, thanks!
The latest build of this product (v24.1.2) was released 2 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.