Breadcrumb Menu Alignment

Navigation for WPF Forum

Posted 11 years ago by Mike Strobel - Atlanta, GA
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 11 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 11 years ago by Mike Strobel - Atlanta, GA
Avatar
Sounds great, thanks!
The latest build of this product (v2018.1 build 0675) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.