ImagePropertiesBase.IconID Property
Specifies an identifier of an image’s icon.
Namespace: DevExpress.Web
Assembly:
DevExpress.Web.v23.2.dll
NuGet Package:
DevExpress.Web
Declaration
[DefaultValue("")]
public virtual string IconID { get; set; }
<DefaultValue("")>
Public Overridable Property IconID As String
Property Value
DevExpress ASP.NET controls ship with a rich collection of icons created by our design team. To learn more see the Icon Collection help topic.
The DevExpress ASP.NET Subscription includes a collection of icons that you can use as an element’s image in most DevExpress controls. Use the IconID property to assign an icon to the image.
Note
The control ignores the IconID property if the image’s URL is specified.
Run Demo: Icon Library Explorer
<dx:ASPxButton ID="ASPxButton1" CssClass="button" runat="server">
<Image IconID="navigation_home_32x32">
</Image>
</dx:ASPxButton>
DevExpress.Web.ASPxMenu myMenu = new DevExpress.Web.ASPxMenu();
myMenu.Items.Add("Home").Image.IconID = "navigation_home_16x16";
myMenu.Items.Add("Profile").Image.IconID = "people_customer_16x16";
myMenu.Items.Add("Clients").Image.IconID = DevExpress.Web.ASPxThemes.IconID.PeopleUsergroup16x16;
myMenu.Items.Add("Reports").Image.IconID = DevExpress.Web.ASPxThemes.IconID.ProgrammingShowtestreport16x16;
Dim myMenu As New DevExpress.Web.ASPxMenu()
myMenu.Items.Add("Home").Image.IconID = "navigation_home_16x16"
myMenu.Items.Add("Profile").Image.IconID = "people_customer_16x16"
myMenu.Items.Add("Clients").Image.IconID = DevExpress.Web.ASPxThemes.IconID.PeopleUsergroup16x16
myMenu.Items.Add("Reports").Image.IconID = DevExpress.Web.ASPxThemes.IconID.ProgrammingShowtestreport16x16
@Html.DevExpress().Menu(settings => {
settings.Name = "myMenu";
settings.Items.Add(item => {
item.Text = "Home";
item.Image.IconID = "navigation_home_16x16";
});
settings.Items.Add(item => {
item.Text = "Profile";
item.Image.IconID = "people_customer_16x16";
});
settings.Items.Add(item => {
item.Text = "Clients";
item.Image.IconID = DevExpress.Web.ASPxThemes.IconID.PeopleUsergroup16x16;
});
settings.Items.Add(item => {
item.Text = "Reports";
item.Image.IconID = DevExpress.Web.ASPxThemes.IconID.ProgrammingShowtestreport16x16;
});
}).GetHtml()
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IconID property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
See Also