This is a migrated thread and some comments may be shown as answers.

Path property notifies me N times when getting back

1 Answer 48 Views
BreadCrumb
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kaloyan
Top achievements
Rank 1
Kaloyan asked on 21 Jun 2012, 04:23 PM

Hello,

I use the RadBreadCrumb control for navigation in my MVVM SL 4.0 application. Let’s say the control represents the site’s navigation tree. There is a Binding between the control’s Path property and a property in the ViewModel.

Let’s imagine that the user navigated into the site to location:

Home/Clients/EU clients/HP Germany

Each of the segments in the BreadCrumb is represented by a page in the application. If the User navigates, using the bread crumb directly to “Home”, the control changes the Path property several times and I am getting in the ViewModel several times invocations of the property setter. If the Path is different from the last one then the application triggers navigation to a given page.

As a result if the users click over “Home” directly I’ll get 3 changes in the Path property:

Home/Clients/EU clients/

Home/Clients/

Home/

For the user it is not visible because all of the operations are very fast, but it generates useless load to the server, because each page starts to load data and then it is replaced by another one. I would like to be notified from the bread crumb only for the item that the user has selected, not for each path change in order to get there.

Is there chance to do this with the RadBreadCrumb control?

Do I miss something, is there any workaround?

1 Answer, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 26 Jun 2012, 12:46 PM
Hi Kaloyan,

The way that the Path property is changed is actually a design decision. However, if you strongly believe that it would be better if we consider changing this behavior, please let me know and I will log your suggestion as a feature request in our PITS. This will allow us to track all customers demand on that issue and prioritize it accordingly.

However, in your case, it would be better to bind the RadBreadCrumb.CurrentItem property and navigate to the pages based on its value. This property's value is changed only once to reflect the new item currently displayed in the breadcrumb.

Please give this a try and let me know if it helps.

Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
BreadCrumb
Asked by
Kaloyan
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Share this question
or