The issue is caused by the fact that the drop down button has its own theming in RadDock, which gets applied to the newly added button.
To reproduce:
protected override void OnLoad(EventArgs e)
{
base.OnLoad(e);
RadDockEvents.TabStripItemCreating += RadDockEvents_TabStripItemCreating;
AddDock();
ThemeResolutionService.ApplicationThemeName = "VisualStudio2012Dark";
}
void RadDockEvents_TabStripItemCreating(object sender, TabStripItemCreatingEventArgs args)
{
RadDropDownButtonElement btn = new RadDropDownButtonElement();
btn.Margin = new System.Windows.Forms.Padding(80, 5, 5, 5);
btn.MinSize = new System.Drawing.Size(50, 20);
btn.Items.Add(new RadMenuItem("asasda"));
args.TabItem.Children.Add(btn);
}
Workaround: use the themes in the attachments