private SidebarDongleController(ElementControlBehavior parent, IBlogPostSidebarContext sidebarContext) { _parent = parent; _sidebarContext = sidebarContext; _sidebarContext.SidebarVisibleChanged += new EventHandler(_sidebarContext_SidebarVisibleChanged); _dongle = new PropertiesDongleControl(); _parent.Controls.Add(_dongle); _dongle.Click += new EventHandler(_dongle_Click); _dongle.Visible = !_sidebarContext.SidebarVisible; AttachPropertiesDongle(); }