Ejemplo n.º 1
0
        /// <summary>
        /// Handle the ExpandedChange event of the sidebar.
        /// </summary>
        /// <param name="sender">The main section that has been expanded.</param>
        /// <param name="e"></param>
        protected void Sidebar_ExpandedChange(object sender, EventArgs e)
        {
            SideBarPanelItem item  = (SideBarPanelItem)sender;
            ChoiceGroup      group = (ChoiceGroup)item.Tag;

            Debug.Assert(group != null);
            group.OnDisplay(this, null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// called by xWindow when everything is all set-up.
        /// </summary>
        /// <remarks> (this comment no longer valid, I think (SFM). this is needed in this adapter, though it was not in previous sidebar adapters.
        /// we use it here because the expanded event of theDotNetBar fires before it is even painted,
        /// and if the listed is showing is based on with the initial tool will be, well, that tool has not been
        /// identified and instantiated at the point the sidebar is just been created.</remarks>
        public override void FinishInit()
        {
            //note: this is obviously not enough if we ever choose to not show the first handle initially.
            //at the moment,, we do not currently support identifying the initially expanded panel anyways,
            //so they should work.
            ChoiceGroup group = (ChoiceGroup)this.MySideBar.Panels[0].Tag;

            group.OnDisplay(this, null);
        }