Help with WPF style
I'm building a WPF desktop app. I've been following this tutorial https://youtu.be/PzP8mw7JUzI?t=991 to figure out how to make a reusable style for a button that has two text blocks (one for a fontawesome icon and one for the label). Sometimes the preview shows the style being correctly applied, but when I build and run the app, it shows that "error" button with the message
The element [Button] could not be displayed because of a problem with System.Windows.Controls.Button.
and the app doesn't open. [more context in next messages]![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1215400575450222642/image.png)
3 Replies
the error points to this line
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1215400644178083880/image.png)
here's how im implementing the style. Messing with the border properties sometimes made the button show up correctly in preview, sometimes it bugged out
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1215401007530377247/image.png)
![No description](https://answer-overflow-discord-attachments.s3.amazonaws.com/1215401007895552070/image.png)
i'm not sure what I'm doing wrong. Is there anything obvious I'm not seeing?