Setting MenuItem Header to - makes it separator and does not display text
See original GitHub issueSetting MenuItem Header to - makes it separator and does not display text.
repro:
<MenuItem Header="-"/>
style used:
<Style Selector="MenuItem">
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="FontSize" Value="12"/>
</Style>
version: 0.6.2-build6248-beta
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
A style intended for type 'MenuItem' cannot be applied to ...
When I try to add Separator to the ContextMenu I receive error: System.InvalidOperationException was unhandled Message="A style intended for ...
Read more >YooTheme Pro Menu Heading and/or Text Separator ...
Hi,. I believe there's a bug with the subtitles option for menu items that are set to Text-Separator and/or Menu Headings.
Read more >MenuItem Class (System.Windows.Controls)
Gets or sets a composite string that specifies how to format the Header property if it is displayed as a string. (Inherited from...
Read more >How to: Use a Custom Context Menu with a TextBox - WPF ...
Each MenuItem element defines a command in the context menu; the Header attribute defines the display text for the menu command, and the...
Read more >WPF Menu Controls - MenuItem (Page 3 of 4)
This holds a simple string that you can set to show the input gesture. Once set, the text appears to the right of...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@robloo we have a Separator. It basically works exactly like MenuSeparator in UWP. There are styles for “MenuItem > Separator” selector to make it look right.
“-” support was specifically added before to simplify some use cases https://github.com/AvaloniaUI/Avalonia/pull/1891. But broke another rare scenario.
I should have known that someone would be using a menu item with just a “-”. Sigh. I wonder how you do this in winforms?