I a trying to implement a shape for two buttons that have a style from Application.Resource, which looks like this:
<Style TargetType="Button">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="#00FFFFFF"/>
<Setter Property="Foreground" Value="WhiteSmoke"/>
<Setter Property="FontFamily" Value="Miryad Pro"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="Button">
<Border x:Name="ButtonBorder"
CornerRadius="3"
BorderThickness="2"
Background="#33FFFFFF"
BorderBrush="#00FFFFFF"
RenderTransformOrigin="0.5,0.5">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="1.7*"/>
</Grid.RowDefinitions>
<ContentPresenter x:Name="ButtonContentPresenter"
VerticalAlignment="Center"
HorizontalAlignment="Center"
Grid.RowSpan="2" />
</Grid>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter Property="RenderTransform" TargetName="ButtonBorder">
<Setter.Value>
<TransformGroup>
<ScaleTransform ScaleX="0.9" ScaleY="0.9"/>
</TransformGroup>
</Setter.Value>
</Setter>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
The button I am trying to re-shape has this code:
<Button x:Name="kontakInterface_btn" VerticalAlignment="Stretch" HorizontalAlignment="Right" Width="40" Height="90" Margin="0,20,0,200" Click="kontakInterface_btn_Click">
<Button.Background>
<VisualBrush>
<VisualBrush.Visual>
<Canvas>
<Path Opacity="0.3" Fill="#ffffffff" Data="F1 M 8.126,171.916 L 58.216,160.074 C 62.411,158.889 65.125,149.942 65.125,147.337 L 65.125,32.680 C 65.125,30.074 61.053,20.469 58.216,19.943 L 8.126,8.496"/>
</Canvas>
</VisualBrush.Visual>
</VisualBrush>
</Button.Background>
<Image Source="C:\Users\PID Projekt I5\Documents\Visual Studio 2015\Projects\ArduinoSMS_sender\ArduinoSMS_sender\Ikone\directory-icon.png"/>
</Button>
What do I need to override or change/add in order for the re-shaping code to work? XAML is really a pain in the ass for me.