How can I stop the Breadcrumb control from setting SelectedItem to null when unloading?

Navigation for WPF Forum

Posted 11 years ago by Craig - Varigence, Inc.
Version: 12.2.0573
Avatar

Background:

We have an application that uses the Breadcrumb control. However, instead of displaying a file system hierarchy, we use it to navigate a visual hierarchy. In this case, 2D rectangles that can contain other rectangles.

Each rectangle has an ID. Thus, when a user selects an ID within the Breadcrumb control, our UI 'zooms in' on the ID's rectangle, so only that rectangle's nested child nodes are seen.

Problem:

When a user navigates away from our custom control, the breadcrumb control sets its SelectedItem property to null. Because we two-way bind to the SelectedItem property, to control the zooming capability, this has the unfortunate and unexpected effect of setting a ViewModel property to null.

Questions:

1. Is setting SelectedItem to null an intentional behavior, or a bug?
2. How can we stop that from happening?

 

Thanks,

-Craig

Comments (3)

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Craig,

I'm watching the SelectedItem property changes in the Breadcrumb in our Breadcrumb Intro sample and I never see it get set to null.  Do you see it happening there?  If so, how?


Actipro Software Support

Posted 11 years ago by Craig - Varigence, Inc.
Avatar

I'm working on a sample that should demonstrate the issue. However, I'm hitting a problem with my sample where it doesn't display the expected trail in the Breadcrumb. Can I send the sample over to you, for help with debugging?

-Craig

Posted 11 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Craig,

Maybe you could start with our intro sample instead and see if you can get it to happen with a clone of that.


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.