Add options flyout#804
Open
vgromfeld wants to merge 2 commits into
Open
Conversation
8859bd1 to
23e1d60
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an optional “Options” flyout button to the Ribbon control template, enabling ribbon-level configuration actions (eg “always show”, “auto hide”) when a FlyoutBase is attached.
Changes:
- Added an
OptionsButtonto theRibboncontrol template and a newOptionsGroupvisual state to control its visibility. - Introduced new
Ribbondependency properties:OptionsFlyout,OptionsAccessibleName, andOptionsAccessKey. - Updated the ribbon sample to demonstrate attaching a
MenuFlyoutto the new options button.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| components/Ribbon/src/RibbonStyle.xaml | Adds an options button to the template and a visual state group to show/hide it. |
| components/Ribbon/src/Ribbon.cs | Adds DPs and visual-state logic intended to toggle the options button based on whether a flyout is set. |
| components/Ribbon/samples/RibbonCustomSample.xaml | Demonstrates the new options flyout feature in the sample page. |
Comments suppressed due to low confidence (1)
components/Ribbon/src/Ribbon.cs:88
- OptionsAccessibleNameProperty is wired to OnOptionsFlyoutPropertyChanged, which appears to be a copy/paste mistake (changing the accessible name shouldn't toggle the OptionsVisible/OptionsCollapsed visual state). This callback should be removed from OptionsAccessibleNameProperty and instead applied to OptionsFlyoutProperty (or renamed/repurposed if intended).
public static readonly DependencyProperty OptionsAccessibleNameProperty = DependencyProperty.Register(
nameof(OptionsAccessibleName),
typeof(string),
typeof(Ribbon),
new PropertyMetadata(string.Empty, OnOptionsFlyoutPropertyChanged));
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
I'm adding an optional
OptionsFlyoutbutton to theRibboncontrol. It allows us to add some configuration options to the ribbon like "always show", "auto hide"...How
I'm adding a new set of properties to the
Ribboncontrol to attached aFlyoutto the new options button.The options button will only be displayed if there is a flyout attached to the ribbon. It can have an access key and an automation name.
Screenshots