Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

Message Bar items are messages with an accompanying hyperlink that, when clicked, navigates the user to a location in the navigation tree.

Adding Message Bar items

Add a message bar item with NavInsertItem.

Items added in the manner shown above display the strLabel text as the message, followed by a link that says "Go There". If you click the link, the WMC navigates to the location specified in strDescription. You can provide customised hyperlink text by providing your own XAML content. See Custom link text.

 

The flags field of the NAVSETITEM structure dictates how the message bar item will be handled.

FlagDescription
NI_FLAG_MESSAGEBAR_ICONWARNING
NI_FLAG_MESSAGEBAR_ICONINFO
NI_FLAG_MESSAGEBAR_ICONSHIELD
The type of icon to show. Mutually exclusive.
NI_FLAG_MESSAGEBAR_NOTIFYNotify the item of the click. Calls the NavItemNotify handler of the notification interface supplied in NavInsertItem. Without this flag the default behaviour is to go to a navigation location.
NI_FLAG_MESSAGEBAR_USERXAMLSpecify to supply custom XAML for the item. See below for details.

Custom link text 

The default link text is Go There but it can be customised by providing your own message string with your link text surrounded by the <a></a> tags when inserting the element. To use a custom message you need to set the flag NI_FLAG_MESSAGEBAR_CUSTOMMESSAGE in the NAVSETITEM structure. 

Hyperlink tag is always the item to look up to check how the event is processed (NOTIFY or GOTO).

If item wants to be notified (MESSAGEBAR_NOTIFY) then Hyperlink tag is the string to call NavNotifyItem on e.g. "MESSAGEBAR\NotificationWarning". So basically the target and notify items are the same.  

If item doesn't want notification then target item's description is used in a call to NavGotoItem.
If the item is inserted with USERXAML, then the tag is specified by the user in the XAML. If it's not custom XAML,then the Hyperlink tag is made from the FQN of the item (Made of the parent and 2nd argument to NavInsertItem)

 

 

 

  • No labels