I have seen this question asked a bunch of times and the answers are always some edit to the XAML code. Here is an answer for code behind.
You will need to edit the ControlTemplate for the button, update this through Style. Here is how I did this in a recent project:
// Create the empty Style
var buttonStyle = new Style(typeof(Button));
// Create ControlTemplate without triggers
var template = new ControlTemplate(typeof(Button));
var border = new FrameworkElementFactory(typeof(Border));
// Minimum binding for the button to work
border.SetValue(Border.BackgroundProperty, new TemplateBindingExtension(Button.BackgroundProperty));
// Create the content presenter for button text
var content = new FrameworkElementFactory(typeof(ContentPresenter));
content.SetValue(ContentPresenter.HorizontalAlignmentProperty, HorizontalAlignment.Center);
content.SetValue(ContentPresenter.VerticalAlignmentProperty, VerticalAlignment.Center);
border.AppendChild(content);
template.VisualTree = border;
buttonStyle.Setters.Add(new Setter(Button.TemplateProperty, template));
Now you just need to set the style at button creation:
var newButton = new Button
{
Content = "Text description",
Style = buttonStyle
};
Hopefully this helps someone else.