问题
I want to remove menu's popup border. Not the menu items's border as explained in this post.
This is a pic of my menu popup and I want to remove the white border the popup has.
I am using mahapps library for my main windows with basedark theme. Also please be patient with me, as I am new to WPF and XAML.
Here are all the things I have tried-
- Overwrote the border thickness and border brush of all the "menu items" with my custom style. This did not help as the border which I am interested is not tied to menuItems.
- Overwrote the border thickness and border brush property of the "menu" element. This just changes the menu element when the mouse is not over it. Hope that made sense.
I need the element/control trigger/content-presenter the menu element possesses to disappear the menu popup border. Hope someone can help me in this regard.
回答1:
My question was similar to the one asked here - Removing thin border around the menuitems
I apologize for duplicating the question. I was of the thinking the property was tied to "Menu" but the property is still tied to "MenuItem". Changing the "Padding" and "BorderThickness" to 0 of the popup's border solved my issue.
来源:https://stackoverflow.com/questions/36459286/wpf-how-to-remove-menu-popup-border