How to wrap text in a Button in WPF

2011-11-14


You have multiple ways to wrap text in a button. Here some sample code:

<Button> 
   <TextBlock>Two<LineBreak/>Lines</TextBlock>  
</Button>

Button button = new Button 
{ 
    Content = new TextBlock { Inlines = { "Two", new LineBreak(), "Lines" } } 
};