-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Menubar #4839
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Redth
approved these changes
Feb 24, 2022
Closed
This was referenced Mar 23, 2022
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-controls-flyout
Flyout
area-controls-flyoutpage
FlyoutPage
area-controls-frame
Frame
area-controls-image
Image control
area-controls-listview
ListView and TableView
area-controls-menubar
Desktop MenuBarItems
area-controls-toolbar
ToolBar
area-controls-window
Window
area-core-hosting
Extensions / Hosting / AppBuilder / Startup
area-navigation
NavigationPage
fixed-in-6.0.200-preview.14.2
Look for this fix in 6.0.200-preview.14.2!
platform/android 🤖
platform/iOS 🍎
platform/windows 🪟
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
Implements #4640
The API names currently follow the WinUI naming schemes. A few suggested alternatives for names that we can explore could be
MenuFlyoutItem => MenuBarMenuItem
MenuFlyoutSubItem => MenuBarSubMenuItem or MenuFlyoutSubMenuItem
Catalyst already comes with a menu so when implementing the menu on Catalyst you have to modify the existing menu. We will need to add more APIs for being able to remove and fully place menus where you want but at this point it will just try to match up against the
Text
and then place the menu according to that (see screenshots)Catalyst Limitations
The
Selectors
for every singleUICommand
have to be unique. Because of this we have to compile in some default number of selectors. We chose 50 for the number of selectors. This means that if a user tries to add more than 50MenuElements
they will be met with the following exceptionExample
MenuBarItems
are added in the same manner asToolbarItems
Once their are properties that belong to
MenuBar
that users want to change we can add an attached propertyWindow.MenuBar<xxxx>
in order for users to configure those properties in the same way that users will customizeNavigationPage.NavBar
Maui.Controls Additions made
Maui.Controls Changes made
Maui.Core Additions made
IMenuBarElement
This is used to attribute a view indicating that it has a MenuBar element that needs to be taken into consideration
IMenuBar
Top Level container.
IMenuBarItem
Used to describe each primary menu inside the
MenuBar
(File, edit, etc..)IMenuFlyoutItem
Describes an item that the user will click on to trigger behavior
IMenuFlyoutSubItem
Used to create submenus
ScreenShots
WinUI
MacCatalyst
Known Issues
IImageSourceLoader
services because the retrieval of the images needs to be synchronous and we don't have synchronous APIs for this.PR Checklist
Does this PR touch anything that might affect accessibility?
If any of the above checkboxes apply to your PR, then the PR will need to provide testing to demonstrate that accessibility still works.