How to increase the size of a SymbolIcon in XAML?

Mike picture Mike · Aug 6, 2014 · Viewed 9.8k times · Source

I have a button that I want to use to launch video playback, so it should look like a "Play" button. The button will be fairly large on screen. This is what I have so far:

<Button Style="{StaticResource PlayButton}">
    <SymbolIcon Symbol="Play"/>                                
</Button>

The PlayButton resource defines a MinHeight and MinWidth of 200px. The problem with this is that the play icon is very small, in the order of 16px or so. How can I make it larger? I tried setting FontSize="200" in the Button declaration, but it makes no difference.

Answer

Mike picture Mike · Aug 6, 2014

Not sure if this is the best way to do it, but it worked for me and might work for you:

<Button Style="{StaticResource PlayButton}">
    <Viewbox MaxHeight="200" MaxWidth="200">
        <SymbolIcon Symbol="Play"/>                                
    </Viewbox>
</Button>