Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ApplicationMenu header can't be set to text #705

Closed
jherby2k opened this issue Mar 8, 2019 · 5 comments
Closed

ApplicationMenu header can't be set to text #705

jherby2k opened this issue Mar 8, 2019 · 5 comments
Assignees
Labels
Milestone

Comments

@jherby2k
Copy link

jherby2k commented Mar 8, 2019

I'm trying to create a "File" menu on my ribbon (see: mspaint.exe). If I set the "Header" property to "File", I get an exception. Seems it wants an icon there, not a header. If I don't set it to anything, I get that weirdo default icon. I can set it to {x:Null} to clear it, but that's not ideal. Can I set a simple text label?

        <fluent:Ribbon>
            <fluent:Ribbon.Menu>
                <fluent:ApplicationMenu  Header="File">
                    <fluent:MenuItem Header="Open"/>
                </fluent:ApplicationMenu>
            </fluent:Ribbon.Menu>
         </fluent:Ribbon>
System.Windows.Markup.XamlParseException
  HResult=0x80131501
  Message=Cannot locate resource 'file'.
  Source=PresentationFramework
  StackTrace:
   at System.Windows.Markup.XamlReader.RewrapException(Exception e, IXamlLineInfo lineInfo, Uri baseUri)

Inner Exception 1:
IOException: Cannot locate resource 'file'.


Environment

  • Fluent.Ribbon 7.0.0-alpha0624
  • Windows 10 1809
  • .NET Core 3.0 (preview 4)
@batzen
Copy link
Member

batzen commented Mar 8, 2019

You seem to be the first one trying to use something different than an icon for the application menu.
Currently there is no way to use a string for the header here.
Changing this would mean a breaking change.
May i ask why you are using the application menu instead of a backstage?

@batzen batzen self-assigned this Mar 8, 2019
@batzen batzen added the Bug 🐞 label Mar 8, 2019
@jherby2k
Copy link
Author

jherby2k commented Mar 8, 2019

My application really just needs an Open, Save and Exit buttons. Putting them right on the ribbon looks weird, but the backstage seems like overkill. Have a look at mspaint or wordpad for what i'm looking for. Simple utilities I think benefit from a simple "File" menu, and I can't really find any examples that use an icon. I think it would confuse people.

@batzen
Copy link
Member

batzen commented Mar 8, 2019

I get that use case. Will have a look at how i can solve this issue.

@jherby2k
Copy link
Author

jherby2k commented Mar 8, 2019

You rule! If I understood WPF better I'd contribute. This has been a learning experience for me.

@DynamicField
Copy link

This was possible before.

@batzen batzen added this to the 7.0.0 milestone Sep 17, 2019
@batzen batzen closed this as completed in 088217b Sep 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants