Ticket Q493179
Visible to All Users

Customize Breadcrumbs in XAF

created 12 years ago

In my XAF application Breadcrumbs display the navigation history of the user. I want to customize it according to my requirements. Like the Breadcrumb should display history. Instead It should display the links Like Home>User> UserName > (Home and User Will be links ) Or Home>SalesDashBoard>Lead>LeadDetails> (Home, SalesDashboar and Lead are Links in this case) etc**.** How to write a WindowContoller to accomplish this task. thanks in advance

Comments (1)
Dennis Garavsky (DevExpress) 12 years ago

    Hello Zak,
    We are working on your issue and will get back to you as soon as we can. In the meantime, please review the how to change history links ticket.

    Answers approved by DevExpress Support

    created 12 years ago (modified 12 years ago)

    Hello Zac,
    Currently, it is possible to customize the default behavior by overriding the CreateNavigationHistory method of the standard WebViewNavigationController class.
    By default, it uses the BreadCrumbsNavigationHistorySequenceStrategy<ViewShortcut> class to define how bread crumbs are generated:

    C#
    protected override NavigationHistory<ViewShortcut> CreateNavigationHistory() { return new NavigationHistory<ViewShortcut>(new BreadCrumbsNavigationHistorySequenceStrategy<ViewShortcut>(HistoryDepth)); }

    I am afraid we do not have any documentation on this class, so I can only advise you by referring to the source code to see how it is implemented:
    …\DevExpress.ExpressApp\Utils\NavigationHistory.cs
    In the UI, history links are shown using the NavigationHistoryActionContainer control (…\DevExpress.ExpressApp.Web\Templates\ActionContainers\NavigationHistoryActionContainer.cs) placed to the page template (Default.aspx) below the view caption. This is an action container, and it shows actions with the ViewsHistoryNavigation category, in particular, the WebViewNavigationController.NavigateToAction. Items of this SingleChoiceAction are shown as links by the NavigationHistoryActionContainer.
    It is possible to customize this control (e.g., set its Delimiter property) as required.
    Take special note that it is possible to build your own Action Container and place it on the page instead of the default NavigationHistoryActionContainer.
    While I do not have a complete and ready example that shows how to accomplish your precise task, I hope you find this information helpful in performing the necessary customizations. Let me know if you have any questions.

      Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

      Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.