TileBarDropDownContainer Class
The dropdown control container that can be associated with a TileBarItem object
Namespace: DevExpress.XtraBars.Navigation
Assembly: DevExpress.XtraBars.v24.2.dll
Declaration
Related API Members
The following members return TileBarDropDownContainer objects:
Remarks
You can associate TileBarItem objects in the TileBar with dropdown controls using the TileBarItem.DropDownControl property, which accepts objects of the TileBarDropDownContainer
type. You can locate the TileBarDropDownContainer
in the Toolbox, drop it onto the form and assign this container to the TileBarItem.DropDownControl property. The TileBarDropDownContainer
can contain any control, including another TileBar control. You can regulate the view and behavior of this control using the TileBarDropDownOptions object.
Example
The following code demonstrates how to create a TileBar control with one tile and associate a dropdown control with this tile.
using DevExpress.XtraBars.Navigation;
using DevExpress.XtraEditors;
using DevExpress.XtraRichEdit;
private TileBar tileBar;
private void Form1_Load(object sender, EventArgs e) {
tileBar = new TileBar();
this.Controls.Add(tileBar);
tileBar.Dock = DockStyle.Top;
tileBar.Height = 100;
tileBar.BackColor = Color.LightGray;
TileBarGroup tileBarGroup = new TileBarGroup();
tileBar.Groups.Add(tileBarGroup);
TileBarItem item = new TileBarItem();
item.Text = "Notes";
item.Image = global::WindowsFormsApplication1.Properties.Resources.textbox_32x32;
item.DropDownOptions.BackColorMode = BackColorMode.UseTileBackColor;
item.DropDownOptions.Height = 185;
tileBarGroup.Items.Add(item);
TileBarDropDownContainer ddContainer = new TileBarDropDownContainer();
ddContainer.Size = new System.Drawing.Size(595, 185);
SimpleButton button = new SimpleButton();
button.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
button.Location = new System.Drawing.Point(510, 152);
button.Size = new System.Drawing.Size(75, 22);
button.Text = "Close";
button.Click += button_Click;
RichEditControl richEditControl = new RichEditControl();
richEditControl.Dock = System.Windows.Forms.DockStyle.Top;
richEditControl.Text = "";
richEditControl.Height = 142;
richEditControl.ActiveViewType = RichEditViewType.Draft;
richEditControl.Options.HorizontalScrollbar.Visibility = RichEditScrollbarVisibility.Hidden;
ddContainer.Controls.Add(button);
ddContainer.Controls.Add(richEditControl);
item.DropDownControl = ddContainer;
}
void button_Click(object sender, EventArgs e) {
tileBar.HideDropDownWindow();
}