Since only some standard items (textBox etc.) can be added to a ToolStrip control at design time in a Winform app, I've added a DateTimePicker control dynamically as follows but I'm not sure how to access the datetime value of the selected date in the control
var datePicker = new ToolStripControlHost(new DateTimePicker());
toolStrip1.Items.Add(datePicker);
I've tried the following that still works as above but can't get access to the selected date value of the dateTimePicker added:
DateTimePicker myDateTimePicker = new DateTimePicker();
var datePicker = new ToolStripControlHost(myDateTimePicker);
toolStrip1.Items.Add(datePicker);
This MSDN tutorial describes how to add items dynamically to ToolStrip but nothing else.