1
I need to create a button style that creates a button inside a Textbox. I am using WPF and a framework called Mahapps.
But the problem is it’s getting that way:
<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>
Someone knows how to do?