<Window.Resources> <ControlTemplate x:Key="TriangleButton"> <Grid Width="100" Height="100"> <StackPanel Orientation="Vertical"> <Path Data="M 30 10 L 50 40 10 40 Z" StrokeThickness="48" StrokeLineJoin="Round" Stroke="Blue" Fill="Blue" /> <TextBlock FontSize="15" HorizontalAlignment="Left" Text="{TemplateBinding Property=Button.Content}" /> </StackPanel> </Grid> </ControlTemplate> </Window.Resources> <Grid> <Button Content="Exit" Template="{StaticResource TriangleButton}" Click="Button_Click" /> </Grid>
Efekt :
Brak komentarzy:
Prześlij komentarz