Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to: Implement Custom Context Navigation

$
0
0

This example illustrates how to implement custom context navigation. The complete description is available in the How to: Implement Custom Context Navigation help topic.

Question Comments

Added By: Max Reimann at: 4/25/2016 1:38:30 AM    When i run your example it only updates his Navigationitems after restart 
so it would be nice if you upgrade you sample with the answer from

https://www.devexpress.com/Support/Center/Question/Details/Q214127

to improve this good example to make it even better :-)

Added By: Konstantin B (DevExpress) at: 4/25/2016 3:02:32 AM    

Hello Max,

The solution from Q214127 is not suitable for all possible scenarios. For instance, there is no ShowNavigationItemController in the current Frame when the MDI mode is enabled, so the NullReferenceException will be thrown. Instead, you can use the following code:

[C#]
Application.MainWindow.GetController<ShowNavigationItemController>().RecreateNavigationItems();

  Another drawback is that focus is lost when calling the RecreateNavigationItems method. This behavior may be inappropriate in certain scenarios, and a separate RefreshNavidation Action will be required. So, we decided not to complicate the current example, as its goal is just to demonstrate how to create navigation items in code. You can choose any appropriate refresh method.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>