Skip to content

Add RadioMenuFlyoutSubItemStyle #4865

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

Merged
merged 11 commits into from
Apr 30, 2021
Merged

Conversation

teaP
Copy link
Contributor

@teaP teaP commented Apr 20, 2021

This change does two main things:

Adds the RadioMenuFlyoutSubItemStyle, which -- if applied to a MenuFlyoutSubItem -- will show a radio dot if a RadioMenuFlyoutItem in the menu is checked. It does this by setting the new attached property AreCheckStatesEnabled, which runs a check when the item is Loaded and sets the appropriate visual state.

Also, the change in code to RadioMenuFlyoutItem makes it so that items don't have to be together in a menu in order to be grouped together. Instead of going through the visual tree to find siblings, it just keeps track of which item is currently checked, and unchecks it when a new item gets checked.

image

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Apr 20, 2021
@beervoley beervoley added team-Controls Issue for the Controls team area-Flyouts labels Apr 20, 2021
@StephenLPeters StephenLPeters added area-UIDesign UI Design, styling and removed needs-triage Issue needs to be triaged by the area owners labels Apr 20, 2021
@ranjeshj ranjeshj requested review from StephenLPeters and jevansaks and removed request for StephenLPeters April 21, 2021 21:20
@ranjeshj ranjeshj requested a review from marksfoster April 21, 2021 21:31
@teaP
Copy link
Contributor Author

teaP commented Apr 22, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@teaP
Copy link
Contributor Author

teaP commented Apr 26, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@teaP
Copy link
Contributor Author

teaP commented Apr 29, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -14,6 +14,12 @@ unsealed runtimeclass RadioMenuFlyoutItem : Windows.UI.Xaml.Controls.MenuFlyoutI

static Windows.UI.Xaml.DependencyProperty IsCheckedProperty{ get; };
static Windows.UI.Xaml.DependencyProperty GroupNameProperty{ get; };

[MUX_DEFAULT_VALUE("false")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New APIs need to be added in [MUX_PUBLIC_V2] block

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, done

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not quite -- this makes the attribute apply only to the next member. You need to put it in { } around the thing:

        [MUX_PUBLIC_V2]
        {
            [MUX_DEFAULT_VALUE("winrt::ControlsResourcesVersion::Version1")]
            ControlsResourcesVersion ControlsResourcesVersion{ get; set; };

            static Windows.UI.Xaml.DependencyProperty ControlsResourcesVersionProperty{ get; };
        }

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jevansaks I've updated this. We need to add the metadata test to catch these type of issues.

teaP and others added 2 commits April 29, 2021 12:52
Add new APIs to MUX_PUBLIC_V2 attribute
@ranjeshj
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ranjeshj ranjeshj merged commit 2adf00c into main Apr 30, 2021
@ranjeshj ranjeshj deleted the user/teaP/RadioMenuFlyoutSubItem branch April 30, 2021 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Flyouts area-UIDesign UI Design, styling team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants