I'm trying to put a StackPanel
into a ModernButton
. Here's the XAML:
<mui:ModernButton Margin="0,50"
IconHeight="10"
IconWidth="10"
Background="#FF68217A"
HorizontalAlignment="Center"
Foreground="Black">
<StackPanel>
<TextBlock>George</TextBlock>
<TextBlock>Washington</TextBlock>
</StackPanel>
When I put this in place I get, "System.Windows.Controls.Stackpanel" displayed on the button. I don't understand why. The ModernButton
is a child of the WPF Button
class, and if replace mui:ModernButton
, it works fine. (Of course you have to get rid of the IconHeight and IconWidth, but the point is that it works.)
So why don't my controls render properly inside of the ModernButton
?