I made a Milonic Menu .NET custom control!
-
- Super Advanced
- Posts: 69
- Joined: Sun May 19, 2002 7:23 pm
- Contact:
Re: I made a Milonic Menu .NET custom control!
And I'm drunk!
Re: I made a Milonic Menu .NET custom control!
Glad to hear you are nicely intoxicated it helps with all the stresses and strains of everyday life
Oh yeah, and thanks for the code I'll check it out properly when I get more familiar with .NET
Cheers
Andy
Oh yeah, and thanks for the code I'll check it out properly when I get more familiar with .NET
Cheers
Andy
-
- Beginner
- Posts: 4
- Joined: Sun May 19, 2002 7:23 pm
I made a Milonic Menu .NET custom control!
I appologize for not being able to give you more information about it, as I JUST compiled a "working" version. For the most part this might only make sense to programmers keeping up with .net, but here's how it works.
Inserting the control is as easy as inserting ANY custom or server control with VisualStudio.net. You just drag the control onto the page! The HTML looks similar to the following:
<%@ Register TagPrefix="cc2" Namespace="MMenu" Assembly="MMenu" %>
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="SiteBorg.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HEAD>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<cc2:MilonicMenu id="menu" runat="server"></cc2:MilonicMenu>
</form>
</body>
The Page_Load function of your page would look something like this.
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
MMenu.MMenuItem menuitem = new MMenu.MMenuItem();
MMenu.MMLink link = new MMenu.MMLink();
MMenu.MMStyle style = new MMenu.MMStyle();
style.FontName = "arial";
style.StyleName = "style1";
style.MouseOffFontColor = "ffffff";
style.MouseOffBackgroundColor = "564b3d";
style.MouseOnFontColor = "ffffcc";
style.MouseOnBackgroundColor = "99cc33";
style.MenuBorderColor = "999999";
style.FontSize = 12;
style.FontStyle = "normal";
style.FontWeight = "normal";
style.FontName = "Verdana,Tahoma,Helvetica";
style.MenuItemPadding = 3;
style.SubMenuImage = "arrow.gif";
style.TDBorderSeparator = 0;
style.TDHighColor = "66ffff";
style.TDLowColor = "000099";
style.RefererItemFontColor = "";
style.RefererItemBackgroundColor = "";
style.TopBarImage = "";
style.MenuHeaderFontColor = "";
style.MenuHeaderBackgroundColor = "";
menuitem.Style = style;
menuitem.MenuName = "mainmenu";
menuitem.MenuTop = 5;
menuitem.MenuLeft = 150;
menuitem.MenuBorder = 1;
menuitem.ScreenPosition = "left";
menuitem.AlwaysVisible = true;
menuitem.HorizontalMenu = true;
menuitem.PositionTopImage = "right";
link.DescriptionText = "Home";
link.URL = "/menu/";
link.SeparatorBar = true;
menuitem.MMLinks.Add(link);
menu.MMenuItems.Add(menuitem);
}
I have no more time to type right now, but that's just cool!
Inserting the control is as easy as inserting ANY custom or server control with VisualStudio.net. You just drag the control onto the page! The HTML looks similar to the following:
<%@ Register TagPrefix="cc2" Namespace="MMenu" Assembly="MMenu" %>
<%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="SiteBorg.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HEAD>
</HEAD>
<body>
<form id="Form1" method="post" runat="server">
<cc2:MilonicMenu id="menu" runat="server"></cc2:MilonicMenu>
</form>
</body>
The Page_Load function of your page would look something like this.
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
MMenu.MMenuItem menuitem = new MMenu.MMenuItem();
MMenu.MMLink link = new MMenu.MMLink();
MMenu.MMStyle style = new MMenu.MMStyle();
style.FontName = "arial";
style.StyleName = "style1";
style.MouseOffFontColor = "ffffff";
style.MouseOffBackgroundColor = "564b3d";
style.MouseOnFontColor = "ffffcc";
style.MouseOnBackgroundColor = "99cc33";
style.MenuBorderColor = "999999";
style.FontSize = 12;
style.FontStyle = "normal";
style.FontWeight = "normal";
style.FontName = "Verdana,Tahoma,Helvetica";
style.MenuItemPadding = 3;
style.SubMenuImage = "arrow.gif";
style.TDBorderSeparator = 0;
style.TDHighColor = "66ffff";
style.TDLowColor = "000099";
style.RefererItemFontColor = "";
style.RefererItemBackgroundColor = "";
style.TopBarImage = "";
style.MenuHeaderFontColor = "";
style.MenuHeaderBackgroundColor = "";
menuitem.Style = style;
menuitem.MenuName = "mainmenu";
menuitem.MenuTop = 5;
menuitem.MenuLeft = 150;
menuitem.MenuBorder = 1;
menuitem.ScreenPosition = "left";
menuitem.AlwaysVisible = true;
menuitem.HorizontalMenu = true;
menuitem.PositionTopImage = "right";
link.DescriptionText = "Home";
link.URL = "/menu/";
link.SeparatorBar = true;
menuitem.MMLinks.Add(link);
menu.MMenuItems.Add(menuitem);
}
I have no more time to type right now, but that's just cool!