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); }
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; }
protected virtual void OnPanelBarGroupCollapsed(PanelBarGroupEventArgs args) { if (this.PanelBarGroupCollapsed != null) { this.PanelBarGroupCollapsed(this, args); } }
private void RadPanelBarElement_PanelBarGroupCollapsed(object sender, PanelBarGroupEventArgs args) { if (this.Children.Count > 0 && this.ElementTree != null) { RadPanelBar panelBar = this.ElementTree.Control as RadPanelBar; if (panelBar != null && this.PanelBarStyle != PanelBarStyles.ExplorerBarStyle && this.PanelBarStyle != PanelBarStyles.VisualStudio2005ToolBox) { panelBar.vScrollBar.Value = 0; this.Children[0].PositionOffset = new SizeF( this.Children[0].PositionOffset.Width, 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); }
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; }
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(); }
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); }
internal void CallPanelBarGroupCollapsed(PanelBarGroupEventArgs args) { OnPanelBarGroupCollapsed(args); }
internal void CallPanelBarGroupUnSelected(PanelBarGroupEventArgs args) { OnPanelBarGroupUnSelected(args); }
internal void CallPanelBarGroupExpanded(PanelBarGroupEventArgs args) { OnPanelBarGroupExpanded(args); }