Welcome
News
Company
Latest
Archive
E-Newsletter
All Years
2015
2016
2017
Mission Statement
Image Kit
Contact
Index
ASP Components
ASP.NET Components
ASP.NET MVC Components
JSP Components
PHP Components
Studio Applications
PanelBar for ASP
WebMenu for ASP
PanelBar for ASP.NET
WebMenu for ASP.NET
WebPropertyGrid for ASP.NET
WebDrillDown for ASP.NET
WebObjectTree for ASP.NET
WebTabSet for ASP.NET
PanelBar for ASP.NET MVC
WebMenu for ASP.NET MVC
WebPropertyGrid for ASP.NET MVC
WebDrillDown for ASP.NET MVC
WebObjectTree for ASP.NET MVC
WebTabSet for ASP.NET MVC
PanelBar for JSP
WebMenu for JSP
WebDrillDown for JSP
WebObjectTree for JSP
WebTabSet for JSP
PanelBar for PHP
WebMenu for PHP
WebDrillDown for PHP
WebObjectTree for PHP
WebTabSet for PHP
PanelBar Studio
WebMenu Studio
WebDrillDown Studio
WebObjectTree Studio
WebTabSet Studio
Knowledge Base
Email
Download
Dev Support
Feedback
View Basket
WebMenu for ASP.NET Core MVC
Home
Products
Support
Basket
Custom MenuBar:
This sample demonstrates how you can replace the built-in MenuBar in WebMenu with your own custom MenuBar.

To accomplish this, you need to turn off the built-in MenuBar in WebMenu by setting the following property:

MenuBar.DisplayMode(DisplayModeConstants.None)

Next, you need to build your own MenuBar to anchor the WebMenu popup menus. You can show and hide the popup menu by calling the client-side JavaScript methods cswmShow and cswmHide, respectively. In this sample, this occurs during the onmouseover and onmouseout events on the buttons:

onmouseover="cswmShow('Home', 'HomeButton', 'below', 0, 0);"
onmouseout="cswmHide();"

This sample demonstrates the optional use of the WebMenu OnShow and OnHide events, which are invoked when the root popup menus are shown or hidden. These event handers are configured to call the custom client-side JavaScript method SwapButton which changes the image of the selected button:

WebMenu.OnShow("SwapButton(id, true)")
WebMenu.OnHide("SwapButton(id, false)")

This sample also uses the WebMenu.SelectedBackgroundImage property to display an image when an item is highlighted.
Control being used:
Coalesys WebMenu for ASP.NET Core MVC
Version 7.0 - Build 130 (Licensed)
Designed for ASP.NET Core MVC 8.0 (64-bit)
Copyright (c) 2000-2024 Coalesys, Inc.
View the code:
The code is available in the samples directory under:
/BasicFeatures
    /CustomMenuBar