<Grid>
<StackPanel>
<StackPanel.Resources>
<Style TargetType="{x:Type Button}" x:Key="Play">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}" >
<Grid>
<Ellipse Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Fill="LightGray" Stroke="Gray" VerticalAlignment="Top" HorizontalAlignment="Left"></Ellipse>
<Polygon Points="18,12 18,35 38, 26" Fill="Black"></Polygon>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</StackPanel.Resources>
<Button Height="50" Width="50" Style="{StaticResource Play}" >
<StackPanel>
<TextBlock>Play</TextBlock>
<Polygon HorizontalAlignment="Center" Fill="Black" Points="0,0 0,26 17,13"></Polygon>
</StackPanel>
</Button>
</StackPanel>
</Grid>
OUTPUT:

<StackPanel>
<StackPanel.Resources>
<Style TargetType="{x:Type Button}" x:Key="Play">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}" >
<Grid>
<Ellipse Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" Fill="LightGray" Stroke="Gray" VerticalAlignment="Top" HorizontalAlignment="Left"></Ellipse>
<Polygon Points="18,12 18,35 38, 26" Fill="Black"></Polygon>
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</StackPanel.Resources>
<Button Height="50" Width="50" Style="{StaticResource Play}" >
<StackPanel>
<TextBlock>Play</TextBlock>
<Polygon HorizontalAlignment="Center" Fill="Black" Points="0,0 0,26 17,13"></Polygon>
</StackPanel>
</Button>
</StackPanel>
</Grid>
OUTPUT:
No comments:
Post a Comment