Esempio n. 1
0
        protected override void DoExpand(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupExpanding(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            for (int i = 0; i < groups.Length; i++)
            {
                RadPanelBarGroupElement group = groups[i];
                group.Expanded = true;
                group.Expand(true);
            }

            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);


            UpdateGroupsUI();
            this.panelBar.CallPanelBarGroupExpanded(groupArgs);


            return;
        }
Esempio n. 2
0
 protected virtual void OnPanelBarGroupSelecting(PanelBarGroupCancelEventArgs args)
 {
     if (this.PanelBarGroupSelecting != null)
     {
         this.PanelBarGroupSelecting(this, args);
     }
 }
Esempio n. 3
0
        protected virtual void DoSelect(RadPanelBarGroupElement[] groups)
        {
            if (groups == null || groups.Length == 0)
            {
                return;
            }

            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupSelecting(groupCancelArgs);
            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                if (group != groups[0])
                {
                    group.Selected = false;
                }
            }
            groups[0].Selected = true;
            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);

            this.panelBar.CallPanelBarGroupSelected(groupArgs);
        }
Esempio n. 4
0
        private bool DoExpandCollapse(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupExpanding(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                groups[0].Expanded = false;
                return(false);
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                if (group.Expanded && group != groups[0])
                {
                    PanelBarGroupCancelEventArgs groupCollapseCancelArgs = new PanelBarGroupCancelEventArgs(group, false);

                    this.panelBar.CallPanelBarGroupCollapsing(groupCancelArgs);

                    if (groupCollapseCancelArgs.Cancel)
                    {
                        this.panelBar.EndUpdate();
                        return(false);
                    }

                    group.Expanded = false;
                    group.Expand(false);

                    PanelBarGroupEventArgs groupCollapseArgs = new PanelBarGroupEventArgs(group);
                    this.panelBar.CallPanelBarGroupCollapsed(groupCollapseArgs);
                }
            }

            groups[0].Expand(true);
            groups[0].Expanded = true;

            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);


            this.panelBar.CallPanelBarGroupExpanded(groupArgs);

            return(true);
        }
Esempio n. 5
0
        protected override void DoExpand(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupExpanding(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                return;
            }

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);


            this.panelBar.CallPanelBarGroupExpanded(groupArgs);

            return;
        }
Esempio n. 6
0
        private void DoSelectUnSelect(RadPanelBarGroupElement[] groups)
        {
            if (groups == null || groups.Length == 0)
            {
                return;
            }

            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupSelecting(groupCancelArgs);
            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                if (group != groups[0])
                {
                    group.Selected = false;
                }
            }
            groups[0].Selected = true;

            if (this.itemsControl.ThemeName != this.GetRadPanelBarElement().ElementTree.ComponentTreeHandler.ThemeName)
            {
                this.itemsControl.ThemeName = this.GetRadPanelBarElement().ElementTree.ComponentTreeHandler.ThemeName;
            }

            MoveContent(groups[0]);
            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);

            this.panelBar.CallPanelBarGroupSelected(groupArgs);

            UnWireEvents();
            this.panelBar.SetStyle();
        }
Esempio n. 7
0
        protected override void DoUnSelect(RadPanelBarGroupElement[] groups)
        {
            PanelBarGroupCancelEventArgs groupCancelArgs = new PanelBarGroupCancelEventArgs(groups[0], false);

            this.panelBar.CallPanelBarGroupUnSelecting(groupCancelArgs);

            if (groupCancelArgs.Cancel)
            {
                return;
            }

            this.panelBar.BeginUpdate();
            foreach (RadPanelBarGroupElement group in this.panelBar.Items)
            {
                group.Selected = false;
            }

            this.panelBar.EndUpdate();

            PanelBarGroupEventArgs groupArgs = new PanelBarGroupEventArgs(groups[0]);

            this.panelBar.CallPanelBarGroupUnSelected(groupArgs);
        }
Esempio n. 8
0
 internal void CallPanelBarGroupCollapsing(PanelBarGroupCancelEventArgs args)
 {
     OnPanelBarGroupCollapsing(args);
 }
Esempio n. 9
0
 //
 internal void CallPanelBarGroupUnSelecting(PanelBarGroupCancelEventArgs args)
 {
     OnPanelBarGroupUnSelecting(args);
 }
Esempio n. 10
0
 internal void CallPanelBarGroupExpanding(PanelBarGroupCancelEventArgs args)
 {
     OnPanelBarGroupExpanding(args);
 }