Skip to content

Spike adding implictor styles to handle null colors#6255

Closed
PureWeen wants to merge 9 commits intomainfrom
implicitor_styles
Closed

Spike adding implictor styles to handle null colors#6255
PureWeen wants to merge 9 commits intomainfrom
implicitor_styles

Conversation

@PureWeen
Copy link
Copy Markdown
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.

@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
Copy Markdown
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 force-pushed the implicitor_styles branch from 845b5f2 to 9cd25bd Compare April 21, 2022 21:25
@PureWeen PureWeen marked this pull request as draft April 26, 2022 20:48
@PureWeen PureWeen force-pushed the implicitor_styles branch from 87480fa to a23a807 Compare April 29, 2022 18:22
@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.

3 participants