C#C
C#9mo ago
pauliology

WPF buttons

Hi all, I am very new to wpf c# or just coding in general.
I am trying to recreate these kind of buttons (To be exact I just want the rounded corners the image in the aligned in the center and just a single caption underneath like the WPF GitHub)

I have this for my code but it is generating a lot of issues and also doesn't apply the corners or semi transparent background

This is my XAML
<Button Margin="2 HorizontalAlignment="Center"">
<Button.Resources>
<Style TargetType="Border">
<Setter Property="CornerRadius" Value="5"/>
</Style>
</Button.Resources>
<Image Source="/Images/cmd.png" />
<TextBox Text="Device 1"/>
</Button>
image.png
Was this page helpful?