protected override void OnDrawItem(DrawItemEventArgs e)
 {
     e.DrawBackground();
     e.DrawFocusRectangle();
     if (!DesignMode)
     {
         LayerDropDownItem item = new LayerDropDownItem(Items[e.Index] as Layer2D, _packable, ((e.State & DrawItemState.Selected) == DrawItemState.Selected));
         e.Graphics.DrawImage(item.Image, e.Bounds.Left, e.Bounds.Top);
     }
     base.OnDrawItem(e);
 }
Exemplo n.º 2
0
 protected override void OnDrawItem(DrawItemEventArgs e)
 {
     e.DrawBackground();
     e.DrawFocusRectangle();
     if (!DesignMode && Items.Count > 0 && e.Index != -1)
     {
         LayerDropDownItem item = new LayerDropDownItem(
             Items[e.Index] as ILayer2D
             , _packable
             , ((e.State & DrawItemState.Selected) == DrawItemState.Selected)
             , new Size(ItemHeight, ItemHeight)
             , Properties.Settings.Default.LayerView3D
             );
         e.Graphics.DrawImage(item.Image, e.Bounds.Left, e.Bounds.Top);
     }
     base.OnDrawItem(e);
 }