void seriesPropertiesMenuItem_Click(object sender, EventArgs e) { ChartSeries series = (ChartSeries)(((ToolStripItem)sender).Tag); CustomPropertiesControl control = new CustomPropertiesControl(); control.SelectedObject = series; HostingForm form = new HostingForm(series.Name + " Properties", control); form.MaximizeBox = false; form.ShowCloseButton = true; form.FormBorderStyle = FormBorderStyle.FixedSingle; form.Show(); }
void SelectedObjectsChartContextMenuItem_Click(object param, EventArgs e) { ToolStripItem item = (ToolStripItem)param; DynamicCustomObject dynamicObject = (DynamicCustomObject)item.Tag; CustomPropertiesControl control = new CustomPropertiesControl(); control.SelectedObject = dynamicObject; control.AutoSize = true; HostingForm form = new HostingForm("Properties", control); form.Width = 400; form.Height = 600; form.Show(); //this.Refresh(); }