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

Update include-mainpage-xaml.md to updated xaml code #18945

Closed
wants to merge 1 commit into from

Conversation

0xharkirat
Copy link

This code is changed to the code generated using the template. Unless it is causing a build error on the old code.

GitHub Issue (If applicable): closes #

PR Type

What kind of change does this PR introduce?

  • Documentation content changes

What is the current behavior?

<Page x:Class="Counter.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:Counter"
      Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
  <StackPanel HorizontalAlignment="Center"
              VerticalAlignment="Center">
    <TextBlock AutomationProperties.AutomationId="HelloTextBlock"
               Text="Hello Uno Platform"
               HorizontalAlignment="Center" />
  </StackPanel>
</Page>

It is causing a build error like this:
image

What is the new behavior?

<Page x:Class="Counter.Presentation.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:Counter.Presentation"
      xmlns:uen="using:Uno.Extensions.Navigation.UI"
      xmlns:utu="using:Uno.Toolkit.UI"
      xmlns:um="using:Uno.Material"
      NavigationCacheMode="Required"
      Background="{ThemeResource BackgroundBrush}">
  <StackPanel HorizontalAlignment="Center"
              VerticalAlignment="Center">
    <TextBlock AutomationProperties.AutomationId="HelloTextBlock"
               Text="Hello Uno Platform"
               HorizontalAlignment="Center" />
  </StackPanel>
</Page>

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

This code is changed to the code generated using the template. Unless it is causing a build error on the old code.
@CLAassistant
Copy link

CLAassistant commented Nov 28, 2024

CLA assistant check
All committers have signed the CLA.

@unodevops
Copy link
Contributor

⚠️⚠️ The build 148755 has failed on Uno.UI - docs.

@morning4coffe-dev
Copy link
Member

Thank you for your contribution, @0xharkirat! Can you please reword (https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message) your commit to follow the Conventional commits standard? https://www.conventionalcommits.org/en/v1.0.0/ Thank you 😇

Comment on lines +8 to +10
xmlns:uen="using:Uno.Extensions.Navigation.UI"
xmlns:utu="using:Uno.Toolkit.UI"
xmlns:um="using:Uno.Material"
Copy link
Member

Choose a reason for hiding this comment

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

I don't see these namespaces being used.

@erikvilima
Copy link

Hi @0xharkirat, I just created a new Uno app following the instructions in the Counter tutorial, and everything seems to be working correctly on my end. Could you double-check to ensure you used the blank preset rather than the recommended one?

For reference the MainPage xaml from a newly created app with the latest template, using the blank preset.

<Page x:Class="Counter.MainPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:local="using:Counter"
      Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
  <ScrollViewer>
    <Grid>
      <StackPanel
        HorizontalAlignment="Center"
        VerticalAlignment="Center">
        <TextBlock AutomationProperties.AutomationId="HelloTextBlock"
          Text="Hello Uno Platform!"
          HorizontalAlignment="Center" />
      </StackPanel>
    </Grid>
  </ScrollViewer>
</Page>

@0xharkirat
Copy link
Author

Oh, I was creating the app from the recommended preset (not the blank one). I think then this request is unnecessary. I can close this one.

@agneszitte
Copy link
Contributor

Oh, I was creating the app from the recommended preset (not the blank one). I think then this request is unnecessary. I can close this one.

Hi @0xharkirat, thank you for the confirmation. Yes, the Counter tutorial documentation mentions using the blank preset.
I am closing this pull request

@agneszitte agneszitte closed this Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants