Gets or sets the collection of
SideBarItems displayed on the
SideBar.
Syntax
Return Value
A reference to a
BarItemCollection, this property stores the collection of
SideBarItem components owned by and displayed on the
SideBar. The default value is a collection with no
SideBarItem components.
Example
The example below shows how to add
SideBarItem components to a
SideBar using the
Items property.
| C# | Copy Code |
|---|
using System; using System.Windows.Forms; using ICreate.Controls.Bars; namespace ExamplesSideBarCSharp { public partial class ItemsPropertyExample : Form { public ItemsPropertyExample() { InitializeComponent(); SideBar sideBar = new SideBar(); sideBar.Dock = DockStyle.Left; sideBar.Items.Add(new SideBarItem("Mail", null)); sideBar.Items.Add(new SideBarItem("Contacts", null)); sideBar.Items.Add(new SideBarItem("Tasks", null)); sideBar.Items.Add(new SideBarItem("Notes", null)); Controls.Add(sideBar); } } } |
| Visual Basic | Copy Code |
|---|
Imports ICreate.Controls.Bars
Public Class ItemsPropertyExample
Public Sub New()
InitializeComponent()
Dim SideBar As SideBar = New SideBar()
SideBar.Dock = DockStyle.Left
SideBar.Items.Add(New SideBarItem("Mail", Nothing))
SideBar.Items.Add(New SideBarItem("Contacts", Nothing))
SideBar.Items.Add(New SideBarItem("Tasks", Nothing))
SideBar.Items.Add(New SideBarItem("Notes", Nothing))
Controls.Add(SideBar)
End Sub
End Class |
Requirements
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also