You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation of Styles in Uno Platform is lacking in some areas, such as Implicit styles, default styles merging, etc.. this issue will track other issues related to the alignment of the Style behavior with Windows' UWP implementation.
Reacted by yowl, FrancoisM, Patrick Decoster, paulovila and José Luis
Here's an assessment of what's missing, with description of some implicit behaviors and related questions:
How do implicit Styles behave?
How does resolution behave?
Standard 'leafmost first.' Styles can be defined in Resources local to a control or programmatically. Applied correctly to views added to tree programmatically.
How do resources behave?
How does FrameworkElement.Resources work under the hood?
Explicit resources are seemingly resolved (or at least their scope is fixed) at parse-time. Resources added programmatically, or belonging to ancestors, can't be referenced in xaml. (Compared to implicit Styles which seem more like they are resolved at runtime.)
Resources added by x:Name are available as StaticResources and are also set as fields on the control, hence can be accessed by x:Bind.
What programmatic interventions are available?
Limited, see above.
What can be bound to?
Both x:Key and x:Name resources.
How does ResourceDictionary behave at low level? (Eg what does Contains return if key is only in merged dictionary, etc)
Do Uno and UWP Styles match in code?
Same comportment? Same contract?
ResourceDictionary doesn't support MergedDictionary; will resolve global defaults if local values not found.
UWP seems to resolve event handlers and x:Bind using IComponentConnector and IComponentConnector2 interfaces respectively.
How does DefaultStyleKey work?
Need to test class libraries
What's the unset value of a custom control?
Typically the type of the base class, including classes with protected constructors (Control, ListViewBase).
What if it's modified at runtime?
How do resources from class libraries behave?
Can a Style from class library X be the default for a type from class library Y?
Can a Style from a class library be used in the default layer for a framework type? If so, local to that class library, or in consuming external apps/libraries?
Reuse original styles, validate all Theme Resources.
Activity
jeromelaban commentedon Jul 31, 2018
Here's an assessment of what's missing, with description of some implicit behaviors and related questions:
Related issues:
Adjust FrameworkElement.Style behavior
Adjust FrameworkElement.Style behavior
Adjust FrameworkElement.Style behavior
dr1rrb commentedon Sep 12, 2018
Linking #190 which is blocked until this got completed.
Update NavigationViewItem flyout presenter
Update NavigationViewItem flyout presenter
Update NavigationViewItem flyout presenter