<Button HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0" Height="120" Width="110" x:Name="Button" Background="GreenYellow" Content="1" BorderBrush="sc#1, 0, 0, 0" Foreground="DarkGreen" FontSize="72"> <Button.Template> <ControlTemplate TargetType="{x:Type Button}"> <Grid Width="Auto" Height="Auto" x:Name="Grid"> <Path Stroke="{TemplateBinding BorderBrush}" Fill="{TemplateBinding Background}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,0,0" Width="Auto" Height="Auto" x:Name="Path" RenderTransformOrigin="0.5,0.5" Stretch="Fill" Data="M60,0 L100,20 100,55 60,75 20,55 20,20 60,0 z"/> <TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Margin="0" x:Name="TextBlock" Text="{TemplateBinding Content}" TextWrapping="Wrap" FontSize="{TemplateBinding FontSize}" FontFamily="{TemplateBinding FontFamily}" FontStyle="{TemplateBinding FontStyle}" FontWeight="{TemplateBinding FontWeight}" FontStretch="{TemplateBinding FontStretch}" Foreground="{TemplateBinding Foreground}"/> </Grid> </ControlTemplate> </Button.Template> </Button>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)