How can I databind to a ToolStripItem?

Unfortunately, the ToolStripItem class itself does not implement databinding features.  However, it is not so hard to add in these features through the magic that is the IBindableComponent interface.  You can now make any component you like implement databinding through the use of this interface.  Here’s a quick sample on how to implement it:    public…

0

December happenings

We have a new PM on our team – Jim Nakashima – he’s got lots of interesting things to say: his older blog was here, and his new blog is here.  The Cider team has published its very first CTP – congrats to Brian, Chuck, Chad, Jim, Subhag et al.  For an intro on the…

1

Profiling

Mike Stall posted some information on the CLR Profiler in 2.0, which reminded me of something I struggled with last week. I wanted to track down a GC Handle leak, I was pretty sure someone was calling GCHandle.Alloc without calling the corresponding Free somewhere.  So I wanted to find a way to log how many…

1

The SuperSecretSideEffect of ResumeLayout(false)

Here’s some really obscure layout information that probably you’ll only need if you’re doing visual inheritance or some fancy MDI goo. One would imagine that this line of code: panel.ResumeLayout() Is equivilant to panel.ResumeLayout(false)panel.PerformLayout() But not so…  imagine I have a button placed in the bottom right hand corner of a panel: button1.Anchor = AnchorStyles.Right |…

0

Full sample – manually handling Overflow

using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms; namespace WindowsApplication5 {    public partial class Form1 : Form {        public Form1() {            InitializeComponent();                    }         // —————————–        // How to use this sample:        // Set all of your items to Overflow.Never        // Sync the toolStrip1.LayoutCompleted event and use toolStrip1_LayoutCompleted handler below        // —————————–         //…

0

Fine-tuning control of your ToolStripItem overflow

Customer question: Can I get a ToolStrip to overflow items in reverse order? That is, overflow the leftmost items before overflowing those to the right.  My scenario is to use a ToolStrip much like the address bar in the Vista Explorer: Virtual Folder 1 > Virtual Folder 2 > … Once the ToolStrip is too…

0