Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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. Calls the NavItemNotify handler of the notification interface supplied in NavInsertItem
NI_FLAG_MESSAGEBAR_USERXAMLYou wish Specify to supply the full custom XAML for the item. See below for details.

 

NI_FLAG_MESSAGEBAR_NOTIFY means call NavNotifyItem, else calls NavGotoItem. If NI_FLAG_MESSAGEBAR_NOTIFY then we notify the tag, otherwise we goto the description

 

...

Custom link text 
Anchor
CustomLinkText
CustomLinkText

The default link text is Go There but it can be customised by providing your own XAML when inserting the element. To use custom XAML you need to set the flag NI_FLAG_MESSAGEBAR_USERXAML in the NAVSETITEM structure. strLabel then becomes the custom XAML and the Hyperlink node's Tag attribute in the XAML specifies the location to navigate to. e.g.

...