Skip to content
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

Spike adding implictor styles to handle null colors #6255

Closed
wants to merge 9 commits into from

Conversation

PureWeen
Copy link
Member

@PureWeen PureWeen commented Apr 19, 2022

Description of Change

Because of the inability to define default styles in xaml this PR attempts to just codify a set of defaults that will act the same as an included XAML file.

The end goal will be to have something like this implicitly included into your MAUI project.

Then if users want to change theme colors they only have to modify a small set of colors to affect the entire application.

src/Controls/src/Core/VisualElement.cs Outdated Show resolved Hide resolved
src/Controls/src/Core/VisualElement.cs Outdated Show resolved Hide resolved
src/Controls/src/Core/VisualStateManager.cs Outdated Show resolved Hide resolved
@PureWeen PureWeen force-pushed the implicitor_styles branch 2 times, most recently from 1234027 to 1eae6c1 Compare April 21, 2022 02:35
@PureWeen PureWeen added the do-not-merge Don't merge this PR label Apr 21, 2022
@PureWeen PureWeen marked this pull request as ready for review April 21, 2022 02:45
Color ITextStyle.TextColor
{
get => TextColor ??
DefaultStyles.GetTextColor(this)?.Value as Color;
Copy link
Member Author

Choose a reason for hiding this comment

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

If the value in Controls gets forcefully set to null then we just revert back to the implicit style here

@PureWeen PureWeen marked this pull request as draft April 26, 2022 20:48
@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 2, 2022
@PureWeen PureWeen closed this May 24, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
do-not-merge Don't merge this PR legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants