This repository has been archived by the owner on May 1, 2024. It is now read-only.
Propagating StyleClass on ShellElements to Flyout templates #9886
Merged
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
PureWeen
added
the
DO-NOT-MERGE-!!! 🛑
This is in progress and needs to be updated before it can be merged.
label
Mar 8, 2020
PureWeen
force-pushed
the
shell_flyout_styling
branch
2 times, most recently
from
March 9, 2020 21:16
5cde4d5
to
7b081c8
Compare
PureWeen
added
p/UWP
and removed
DO-NOT-MERGE-!!! 🛑
This is in progress and needs to be updated before it can be merged.
labels
Mar 9, 2020
PureWeen
force-pushed
the
shell_flyout_styling
branch
from
March 12, 2020 01:43
5aec4db
to
8770251
Compare
PureWeen
added
the
blocker
Issue blocks next stable release. Prioritize fixing and reviewing this issue.
label
Mar 20, 2020
samhouts
reviewed
Mar 20, 2020
PureWeen
added
the
DO-NOT-MERGE-!!! 🛑
This is in progress and needs to be updated before it can be merged.
label
Mar 24, 2020
PureWeen
force-pushed
the
shell_flyout_styling
branch
from
March 24, 2020 22:46
8770251
to
9889350
Compare
PureWeen
removed
the
DO-NOT-MERGE-!!! 🛑
This is in progress and needs to be updated before it can be merged.
label
Mar 24, 2020
PureWeen
commented
Mar 24, 2020
@@ -62,8 +62,8 @@ public IList<string> StyleClass | |||
if (_styleClass != null) { | |||
_classStyleProperties = new List<BindableProperty> (); | |||
foreach (var styleClass in _styleClass) { | |||
var classStyleProperty = BindableProperty.Create ("ClassStyle", typeof(IList<Style>), typeof(VisualElement), default(IList<Style>), | |||
propertyChanged: (bindable, oldvalue, newvalue) => ((VisualElement)bindable)._mergedStyle.OnClassStyleChanged()); |
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.
I just removed the cast because AFAICT _mergedStyle will always just be this
If that's not true then I think MergedStyle should be added to IStyleSelectable
PureWeen
commented
Mar 24, 2020
{ | ||
IList<string> IStyleSelectable.Classes |
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.
Because the classes are defined on NavigeableElement
I just moved the interface up to that class and removed from here to avoid confusion
PureWeen
force-pushed
the
shell_flyout_styling
branch
from
March 25, 2020 23:04
0a5c33d
to
15acdb4
Compare
samhouts
approved these changes
Mar 25, 2020
PureWeen
force-pushed
the
shell_flyout_styling
branch
from
April 3, 2020 17:46
15acdb4
to
7c7ad17
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
a/shell 🐚
blocker
Issue blocks next stable release. Prioritize fixing and reviewing this issue.
Core
m/high impact ⬛
p/Android
p/iOS 🍎
p/UWP
partner/cat 😻
proposal-accepted
roadmap
t/enhancement ➕
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
Added default style Classes. If users set any of these it will automatically just apply those styles to all of the items
Fix UWP to use flyout/menu item templates
When a user sets the StyleClass on a BaseShellElement, propagate that StyleClass to the default template for the flyout items
All style classes are added to the Grid/Label/Image that make up the template so you can style anything
As customization grows (tabs, etc..) these styles can get applied to those as well. At which point we will most likely expand this to attached properties so you can specify Tab.StyleClass and FlyoutItem.StyleClass to articulate the style class for different contexts
Issues Resolved
Platforms Affected
Behavioral/Visual Changes
Testing Procedure
PR Checklist