-
Notifications
You must be signed in to change notification settings - Fork 730
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
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
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")] |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, done
There was a problem hiding this comment.
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; };
}
There was a problem hiding this comment.
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.
Add new APIs to MUX_PUBLIC_V2 attribute
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
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.