unoplatform / uno.templates

Uno Platform project templates
https://platform.uno/
Other
16 stars 9 forks source link

[Bug] Recommended template should include a scrollviewer #649

Closed jeromelaban closed 2 months ago

jeromelaban commented 2 months ago

Current behavior

The recommended template should include a scrollviewer in the main page to allow for the textbox to be shown when the SIP is opened.

Expected behavior

The textbox is visible on a landscape tablet

Affected platforms

Android

Template Host

dotnet new

Host OS

Windows

Template Options

recommeded

Template Version

5.2.80

Anything else we need to know?

No response

dansiegel commented 2 months ago

To confirm you're wanting:

<Grid utu:SafeArea.Insets="VisibleBounds">
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition />
  </Grid.RowDefinitions>
  <utu:NavigationBar Content="{Binding Title}" />

  <StackPanel Grid.Row="1"
        HorizontalAlignment="Center"
        VerticalAlignment="Center"
        Spacing="16">
    <TextBox Text="{Binding Name, Mode=TwoWay}"
        PlaceholderText="Enter your name:" />
    <Button Content="Go to Second Page"
        AutomationProperties.AutomationId="SecondPageButton"
        Command="{Binding GoToSecond}" />
  </StackPanel>
</Grid>

to become:

<Grid utu:SafeArea.Insets="VisibleBounds">
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition />
  </Grid.RowDefinitions>
  <utu:NavigationBar Content="{Binding Title}" />

  <ScrollViewer Grid.Row="1">
    <StackPanel HorizontalAlignment="Center"
          VerticalAlignment="Center"
          Spacing="16">
      <TextBox Text="{Binding Name, Mode=TwoWay}"
          PlaceholderText="Enter your name:" />
      <Button Content="Go to Second Page"
          AutomationProperties.AutomationId="SecondPageButton"
          Command="{Binding GoToSecond}" />
    </StackPanel>
  </ScrollViewer>
</Grid>
jeromelaban commented 2 months ago

Close, the ScrollViewer should be around the grid.