jondinham
jondinham

Reputation: 8511

How to create ContextMenu with no border in C#?

How to create ContextMenu with no border in C# (winform)?

The question is quite straight forward, I just only want to remove the border of ContextMenu. The ContextMenu here is System.Windows.Forms.ContextMenu.

If the only solution is to inherit ContextMenu and override DrawItem, there's no worse pain.

Any suggestion?

Upvotes: 0

Views: 966

Answers (1)

Sandeep G B
Sandeep G B

Reputation: 4015

If you are using WPF then you can set the border thickness to 0

<ContextMenu BorderThickness="0">

Upvotes: 1

Related Questions