private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { var exportItem = e.Items.FirstOrDefault(i => i.ButtonType == DashboardButtonType.Export); if (exportItem != null) { e.Items.Remove(exportItem); } DashboardToolbarItem btnChangeLayout = new DashboardToolbarItem(); btnChangeLayout.Caption = "Change Layout"; btnChangeLayout.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(ChangeLayout); e.Items.Add(btnChangeLayout); DashboardToolbarItem btnRepositionItems = new DashboardToolbarItem(); btnRepositionItems.Caption = "Reposition Items"; btnRepositionItems.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(RepositionItems); e.Items.Add(btnRepositionItems); DashboardToolbarItem btnSaveLayout = new DashboardToolbarItem(); btnSaveLayout.Caption = "Save Layout to File"; btnSaveLayout.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(SaveLayoutToFile); e.Items.Add(btnSaveLayout); DashboardToolbarItem btnLoadLayout = new DashboardToolbarItem(); btnLoadLayout.Caption = "Load Layout from File"; btnLoadLayout.ClickAction = new Action <DashboardToolbarItemClickEventArgs>(LoadLayoutFromFile); e.Items.Add(btnLoadLayout); }
void DashboardDesignerCustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem mergeItem = new DashboardToolbarItem("Open Dashboard to merge", MergeDashboard); mergeItem.SvgImage = (SvgImage)Properties.Resources.MergeIcon; mergeItem.Caption = "Merge Dashboard"; e.Items.Insert(0, mergeItem); }
private void DashboardViewer_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem myCommandButton = new DashboardToolbarItem(); myCommandButton.Caption = "Modify Chart"; myCommandButton.ClickAction = new Action <DashboardToolbarItemClickEventArgs>((args) => { ModifyChart(); }); e.Items.Add(myCommandButton); }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardViewer viewer = (DashboardViewer)sender; // Create the command button to set Master Filter. DashboardToolbarItem setMasterFilterItem = new DashboardToolbarItem("Set Master Filter", new Action <DashboardToolbarItemClickEventArgs>((args) => { SetMasterFilterMethod(); })); setMasterFilterItem.Caption = "Set Master Filter"; e.Items.Insert(0, setMasterFilterItem); }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem titleButton = new DashboardToolbarItem("Load Data", new Action <DashboardToolbarItemClickEventArgs>((args) => { LoadNewData(); })); titleButton.Caption = "Load Data"; e.Items.Add(titleButton); }
private void DashboardViewer1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem resetStateItem = new DashboardToolbarItem("Reset State", new Action <DashboardToolbarItemClickEventArgs>((args) => { dashboardViewer1.SetDashboardState(CreateDashboardState());; })); resetStateItem.Caption = "Reset Dashboard State"; e.Items.Add(resetStateItem); }
private void DashboardDesigner1_CustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { e.Items.Add(new DashboardToolbarItem("Clear Log", new Action <DashboardToolbarItemClickEventArgs>((args) => { memoEdit1.Text = string.Empty; } ))); e.Items.Add(new DashboardToolbarItem("Add a new Grid item", new Action <DashboardToolbarItemClickEventArgs>((args) => { DashboardDesigner dControl = sender as DashboardDesigner; dControl.Dashboard.Items.AddRange(new GridDashboardItem(), new ChartDashboardItem()); } ))); }
void DashboardViewerCustomizeDashboardTitle(object sender, CustomizeDashboardTitleEventArgs e) { DashboardToolbarItem nextTabItem = new DashboardToolbarItem("Next tab", NextPrevTabItemClick); nextTabItem.Tag = NextPrevValue.Next; nextTabItem.SvgImage = imageCollection["Next"]; e.Items.Insert(0, nextTabItem); DashboardToolbarItem prevTabItem = new DashboardToolbarItem("Previous tab", NextPrevTabItemClick); prevTabItem.Tag = NextPrevValue.Prev; prevTabItem.SvgImage = imageCollection["Prev"]; e.Items.Insert(0, prevTabItem); DashboardToolbarItem showTabHederItem = new DashboardToolbarItem(TabContainer.ShowCaption, "Show tab headers", ShowHideTabHeadersItemClick); showTabHederItem.SvgImage = imageCollection["ShowCaption"]; e.Items.Insert(0, showTabHederItem); DashboardToolbarItem slideShowItem = new DashboardToolbarItem(slideShowTimer.Enabled, "Slideshow", SlideShowItemClick); slideShowItem.SvgImage = imageCollection["Slideshow"]; e.Items.Insert(0, slideShowItem); }