❔ WPF Border Button
Hello, have you any idea why there is this gray border on the button ?
the dimensions of my image is 40x30 so it should fit in my button without this gray border
the dimensions of my image is 40x30 so it should fit in my button without this gray border
6 Replies
I think that's probably part of the button -- your image is being placed inside the button, but doesn't replace the styling it already has
You can replace the
ControlTemplate
instead -- that should replace everything, including the press styling, etxc
perfect that was the problem it works well, i will create a style rn to reduce the xaml code in my page thanks you !
One more thing, do not use the designer
If Margins are larger than 30, it's bad.
$rulesofwpf
Yeah I know about margin just for the beginning I'm using this to have a preview I will set all my stuff in the page without it after I've validated my style
I'm still tryin to figure out how xaml work really for many things 😅
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.