KEMBAR78
Updated Default project template by jsuarezruiz · Pull Request #6319 · dotnet/maui · GitHub
Skip to content

Conversation

@jsuarezruiz
Copy link
Contributor

@jsuarezruiz jsuarezruiz commented Apr 20, 2022

Description of Change

This will avoid confusion with the double title. @davidortinau What should be the new title?, ".NET MAUI" is fine?

image

image

Issues Fixed

Fixes #5732

@jsuarezruiz jsuarezruiz added t/housekeeping ♻︎ area-templates Project templates, Item Templates for Blazor and MAUI labels Apr 20, 2022
@davidortinau
Copy link
Contributor

Let's do this.

image

image

<Grid>
        <VerticalStackLayout Spacing="25" Padding="30,0" VerticalOptions="Center">
            <Image
                Source="dotnet_bot.png"
                SemanticProperties.Description="Cute dot net bot waving hi to you!"
                HeightRequest="200"
                HorizontalOptions="Center" />
            <Label 
                Text="Hello, World!"
                SemanticProperties.HeadingLevel="Level1"
                FontSize="32"
                HorizontalOptions="Center" />
            
            <Label 
                Text="Welcome to .NET Multi-platform App UI"
                SemanticProperties.HeadingLevel="Level1"
                SemanticProperties.Description="Welcome to dot net Multi platform App U I"
                FontSize="18"
                HorizontalOptions="Center" />

            <Button 
                x:Name="CounterBtn"
                Text="Click me"
                SemanticProperties.Hint="Counts the number of times you click"
                Clicked="OnCounterClicked"
                HorizontalOptions="Center" />

        </VerticalStackLayout>
    </Grid>
private void OnCounterClicked(object sender, EventArgs e)
	{
		count++;
		CounterBtn.Text = $"Clicked {count} times";
		
		SemanticScreenReader.Announce(CounterBtn.Text);
	}
<Style x:Key="BaseStyle" TargetType="Element">
        <Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Black}}" />
        <Setter Property="Shell.ForegroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
        <Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource White}}" />
        <Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
        <Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
        <Setter Property="Shell.NavBarHasShadow" Value="False" />
        <Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
        <Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
        <Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
        <Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource DarkGray}}" />
    </Style>
    <Style BasedOn="{StaticResource BaseStyle}" TargetType="ShellItem" ApplyToDerivedTypes="True" />

    <Style TargetType="NavigationPage">
        <Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Black}}" />
        <Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource White}}" />
        <Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource LightGray}, Dark={StaticResource White}}" />
    </Style>

@rachelkang
Copy link
Member

@davidortinau This looks great, thanks!

One question - what about the current count label? Should we keep that above the "Click me" button? (It doesn't make sense to remove it completely while keeping the SemanticReader.Announce logic, unless we reove both and make the button do somethng else)

@davidortinau
Copy link
Contributor

image

image

@davidortinau
Copy link
Contributor

@davidortinau This looks great, thanks!

One question - what about the current count label? Should we keep that above the "Click me" button? (It doesn't make sense to remove it completely while keeping the SemanticReader.Announce logic, unless we reove both and make the button do somethng else)

The button text updates now instead of the label.

image

@rachelkang
Copy link
Member

@davidortinau Sorry, I see it now that you added it to update the button text

@Redth
Copy link
Member

Redth commented Apr 25, 2022

@jsuarezruiz @rachelkang not sure which colors we wanted in the conflict here, can you resolve them please?

@jsuarezruiz
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 2 pipeline(s).

@rachelkang rachelkang changed the title Updated Default project template title Updated Default project template Apr 27, 2022
@PureWeen PureWeen merged commit 6484698 into main Apr 27, 2022
@PureWeen PureWeen deleted the fix-5732 branch April 27, 2022 14:56
@github-actions github-actions bot locked and limited conversation to collaborators Dec 22, 2023
@samhouts samhouts added the fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! label Aug 2, 2024
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 fixed-in-6.0.300-rc.3 Look for this fix in 6.0.300-rc.3! t/housekeeping ♻︎

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default template has a double heading/title

7 participants