MenuEventArgs Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Initializes a new instance of the MenuEventArgs class.
Overloads
MenuEventArgs(MenuItem) |
Initializes a new instance of the MenuEventArgs class using the specified menu item. |
MenuEventArgs(MenuItem, Object, CommandEventArgs) |
Initializes a new instance of the MenuEventArgs class using the specified menu item, command source, and event arguments. |
MenuEventArgs(MenuItem)
Initializes a new instance of the MenuEventArgs class using the specified menu item.
public:
MenuEventArgs(System::Web::UI::WebControls::MenuItem ^ item);
public MenuEventArgs (System.Web.UI.WebControls.MenuItem item);
new System.Web.UI.WebControls.MenuEventArgs : System.Web.UI.WebControls.MenuItem -> System.Web.UI.WebControls.MenuEventArgs
Public Sub New (item As MenuItem)
Parameters
- item
- MenuItem
For the MenuItemClick event, this parameter represents the menu item clicked by the user. For the MenuItemDataBound event, this parameter represents the menu item being bound to data.
Remarks
Use this constructor to create a new instance of the MenuEventArgs class from the specified menu item. The following table shows initial property values for an instance of the MenuEventArgs class.
Property | Initial value |
---|---|
CommandArgument | null |
CommandName | Empty |
CommandSource | null |
Item | The MenuItem object specified by the item parameter. |
See also
Applies to
MenuEventArgs(MenuItem, Object, CommandEventArgs)
Initializes a new instance of the MenuEventArgs class using the specified menu item, command source, and event arguments.
public:
MenuEventArgs(System::Web::UI::WebControls::MenuItem ^ item, System::Object ^ commandSource, System::Web::UI::WebControls::CommandEventArgs ^ originalArgs);
public MenuEventArgs (System.Web.UI.WebControls.MenuItem item, object commandSource, System.Web.UI.WebControls.CommandEventArgs originalArgs);
new System.Web.UI.WebControls.MenuEventArgs : System.Web.UI.WebControls.MenuItem * obj * System.Web.UI.WebControls.CommandEventArgs -> System.Web.UI.WebControls.MenuEventArgs
Public Sub New (item As MenuItem, commandSource As Object, originalArgs As CommandEventArgs)
Parameters
- item
- MenuItem
For the MenuItemClick event, this parameter represents the menu item clicked by the user. For the MenuItemDataBound event, this parameter represents the menu item being bound to data.
- originalArgs
- CommandEventArgs
A CommandEventArgs that contains the command name and command argument values for the menu item.
Remarks
Use this constructor to create a new instance of the MenuEventArgs class from the specified menu item, command source, and event arguments. The following table shows initial property values for an instance of the MenuEventArgs class.
Property | Initial value |
---|---|
CommandArgument | The value of the originalArgs.CommandArgument parameter. |
CommandName | The value of the originalArgs.CommandName parameter. |
CommandSource | The Object specified by the commandSource parameter. |
Item | The MenuItem object specified by the item parameter. |
See also
- CommandEventArgs
- MenuItem
- CommandArgument
- CommandName
- CommandSource
- Item
- MenuItemClick
- MenuItemDataBound
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om