I need to create a button style that creates a button inside a Textbox. I'm using WPF and a framework called MahApps.
Buttheproblemisthatit'sgettingthisway:
<Style TargetType="{x:Type TextBox}"
x:Key="OpenFileMetroTextBox"
BasedOn="{StaticResource ButtonCommandMetroTextBox}">
<Setter Property="Controls:TextBoxHelper.ButtonTemplate">
<Setter.Value>
<ControlTemplate TargetType="{x:Type Button}">
<Button>
<Rectangle Width="10" Height="10">
<Rectangle.Resources>
<SolidColorBrush x:Key="BlackBrush" Color="White" />
</Rectangle.Resources>
<Rectangle.Fill>
<VisualBrush Stretch="Fill" Visual="{StaticResource appbar_add}" />
</Rectangle.Fill>
</Rectangle>
</Button>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>