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

Add default BackgroundColor to controls in Styles #6820

Merged
merged 6 commits into from
May 5, 2022

Conversation

rachelkang
Copy link
Member

Description of Change

  • Moved Styles and Colors resource files to a new Resources/Styles/ subdirectory
  • Updated Styles to add BackgroundColor to various controls

Issues Fixed

Fixes #6006

@Eilon Eilon added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label May 4, 2022
@rachelkang rachelkang added the area-templates Project templates, Item Templates for Blazor and MAUI label May 4, 2022
@rachelkang rachelkang added this to the 6.0.300 milestone May 4, 2022
@mattleibow
Copy link
Member

I see there are some AOT profile changes?

Comment on lines -10 to +11
<ResourceDictionary Source="Resources/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles.xaml" />
<ResourceDictionary Source="Resources/Styles/Colors.xaml" />
<ResourceDictionary Source="Resources/Styles/Styles.xaml" />
Copy link
Member

Choose a reason for hiding this comment

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

Thanks! This was the thing that broke before when we changed the template.

.nuspec/maui.aotprofile.txt Outdated Show resolved Hide resolved
jonathanpeppers added a commit to jonathanpeppers/maui that referenced this pull request May 4, 2022
In dotnet#6820 Rachel and I noticed that there were quite a few API changes
that made the `.aotprofile`'s for MAUI out of date.

Looking at the [JIT times report][0] for the .NET Podcast app, I saw a
couple we could address:

Total (ms) |  Self (ms) | Method
      2.61 |       2.61 | string:SplitInternal (string,string[],int,System.StringSplitOptions)
      1.57 |       1.57 | System.Number:NumberToString (System.Text.ValueStringBuilder&,System.Number/NumberBuffer&,char,int,System.Globalization.NumberFormatInfo)
      1.52 |       1.52 | System.Number:TryParseInt32IntegerStyle (System.ReadOnlySpan`1<char>,System.Globalization.NumberStyles,System.Globalization.NumberFormatInfo,int&)

I added usage of `string.Split()`, `int.Parse()`, and `int.ToString()`
to `CommonMethods.cs`.

[0]: https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/profiling.md#profiling-the-jit-compiler

~~ Results ~~

Testing on a Pixel 5, an average of 10 runs.

.NET Podcast app:

    Average(ms): 796.8
    Std Err(ms): 3.47626875319565
    Std Dev(ms): 10.992927018972
    ---
    Average(ms): 786.8
    Std Err(ms): 2.0591260281974
    Std Dev(ms): 6.51152823843988

`dotnet new maui`:

    Average(ms): 563.7
    Std Err(ms): 3.26955654485436
    Std Dev(ms): 10.3392456204503
    ---
    Average(ms): 545.3
    Std Err(ms): 2.39930545505708
    Std Dev(ms): 7.5872700404471
@PureWeen PureWeen merged commit a8da034 into main May 5, 2022
@PureWeen PureWeen deleted the tweak-template-styles-2 branch May 5, 2022 00:16
mattleibow pushed a commit that referenced this pull request May 5, 2022
In #6820 Rachel and I noticed that there were quite a few API changes
that made the `.aotprofile`'s for MAUI out of date.

Looking at the [JIT times report][0] for the .NET Podcast app, I saw a
couple we could address:

Total (ms) |  Self (ms) | Method
      2.61 |       2.61 | string:SplitInternal (string,string[],int,System.StringSplitOptions)
      1.57 |       1.57 | System.Number:NumberToString (System.Text.ValueStringBuilder&,System.Number/NumberBuffer&,char,int,System.Globalization.NumberFormatInfo)
      1.52 |       1.52 | System.Number:TryParseInt32IntegerStyle (System.ReadOnlySpan`1<char>,System.Globalization.NumberStyles,System.Globalization.NumberFormatInfo,int&)

I added usage of `string.Split()`, `int.Parse()`, and `int.ToString()`
to `CommonMethods.cs`.

[0]: https://github.com/xamarin/xamarin-android/blob/main/Documentation/guides/profiling.md#profiling-the-jit-compiler

~~ Results ~~

Testing on a Pixel 5, an average of 10 runs.

.NET Podcast app:

    Average(ms): 796.8
    Std Err(ms): 3.47626875319565
    Std Dev(ms): 10.992927018972
    ---
    Average(ms): 786.8
    Std Err(ms): 2.0591260281974
    Std Dev(ms): 6.51152823843988

`dotnet new maui`:

    Average(ms): 563.7
    Std Err(ms): 3.26955654485436
    Std Dev(ms): 10.3392456204503
    ---
    Average(ms): 545.3
    Std Err(ms): 2.39930545505708
    Std Dev(ms): 7.5872700404471
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-templates Project templates, Item Templates for Blazor and MAUI 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.

Some control styling doesn't reflect UserAppTheme
5 participants