Skip to content

Commit

Permalink
[net8.0] Merge main to net8 (#19898)
Browse files Browse the repository at this point in the history
* Fix issue 18110

* Fix SetProgressViewOffset on SwipeRefreshLayout (#19767)

* Fix SetProgressViewOffset on SwipeRefreshLayout

* - update refresh icon to a better color to trigger screen shot comparison

* - remove extra code

* - add better exception

* Fix incorrect defaults when adding non-BindableObject as AbsoluteLayout child (#19839)

* [Windows] Show the Raw HTML for Html Label in case of error (#17470)

* Show the Raw HTML in case of error

* Try to add UITest for Broken HTML

* added optional ReceiveSms permission (#19659)

* iOS Keyboard Scrolling Improvements and UITests (not from fork) (#17670)

* Squash all the iOS Keyboard Improvements

* delay was enough manually, but not for tests

* remove debugging

* Add logic for Disconnect to be more useful

* fix spacing from github merge conflict commit

* accidently removed a var declaration

* Improve UITests and add double scroll for LargeTitles

* Add UITest for the grid star

* Style changes

* more style

* add fixtureTeardown

* only check for LargeTitles in portrait mode

* Add changes for LargeTitles on iPad

* remove the popover code until we get tests

* [ci] Bump XCode to 15.2.0 (#19836)

* [ci] Bump XCode to 15.1.0

* Go to Xcode 15.2

* New xcode 15.1 doesn't support 14.5 simulators

* Add missing AbsoluteLayout section to layout architecture doc (#19841)

* [ci] Don't install xharness globally (#19863)

* dont install xharness globally

* Fix restore

* Update README.md (#19797)

* [xamlg] improve error for Xamarin.Forms namespace (#19683)

* [xamlg] improve error for Xamarin.Forms namespace

Fixes: #18637

Using the old namespace `http://xamarin.com/schemas/2014/forms` was
causing a NRE:

    System.NullReferenceException: Object reference not set to an instance of an object.
    at Microsoft.Maui.Controls.Xaml.XmlTypeXamlExtensions.GetTypeReference[T](XmlType xmlType, IEnumerable`1 xmlnsDefinitions, String defaultAssemblyName, Func`2 refFromTypeInfo)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.GetTypeNameFromCustomNamespace(XmlType xmlType, Compilation compilation, AssemblyCaches caches)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.GetTypeName(XmlType xmlType, Compilation compilation, AssemblyCaches caches)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.TryParseXaml(SourceText text, String uid, Compilation compilation, AssemblyCaches caches, CancellationToken cancellationToken, String targetFramework, String& accessModifier, String& rootType, String& rootClrNamespace, Boolean& generateDefaultCtor, Boolean& addXamlCompilationAttribute, Boolean& hideFromIntellisense, Boolean& xamlResourceIdOnly, String& baseType, IEnumerable`1& namedFields, Exception& exception)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.GenerateXamlCodeBehind(ProjectItem projItem, Compilation compilation, SourceProductionContext context, AssemblyCaches caches)
    at Microsoft.Maui.Controls.SourceGen.CodeBehindGenerator.<>c.<Initialize>b__1_1(SourceProductionContext sourceProductionContext, ValueTuple`3 provider)
    at Microsoft.CodeAnalysis.UserFunctionExtensions.<>c__DisplayClass3_0`2.<WrapUserAction>b__0(TInput1 input1, TInput2 input2, CancellationToken token)

In f939049, I inadvertently introduced this NRE, but even after fixing
it, I would instead get:

    FormsNamespace.xaml.sg.cs(15,48): error CS1001: Identifier expected

Due to the namespace, type, and base type all being `null` in this case,
the generated C# is invalid.

Instead of generating C# *at all*, let's emit an error message that says
to use the correct namespace.

I also provided a `Location` for the error message, so we will now know
what file the error originated from.

I attempted to write some test here, but adding an invalid file like
this causes the XAML unit tests project to fail to build. It feels like
we actually need to create a unit test project for the source generator
-- as there isn't one now.

* Add `[Obsolete]` to `FormsUri`

---------

Co-authored-by: Mike Parker <mikeparker104>
Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: E.Z. Hart <hartez@users.noreply.github.com>
Co-authored-by: Tim Miller <drasticactions@users.noreply.github.com>
Co-authored-by: Mike Parker <mikeparker104@users.noreply.github.com>
Co-authored-by: Georgy <tarasverq@yandex.ru>
Co-authored-by: TJ Lambert <50846373+tj-devel709@users.noreply.github.com>
Co-authored-by: James Montemagno <james.montemagno@gmail.com>
Co-authored-by: Jonathan Peppers <jonathan.peppers@microsoft.com>
  • Loading branch information
9 people authored Jan 15, 2024
1 parent 527a658 commit 62ca213
Show file tree
Hide file tree
Showing 45 changed files with 1,051 additions and 33 deletions.
10 changes: 5 additions & 5 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ Param(
)

# Restore Cake tool
# & dotnet tool restore
$tools = Get-Content ".config/dotnet-tools.json" | ConvertFrom-Json
foreach ($tool in $tools.tools.PsObject.Properties) {
& dotnet tool install $tool.Name --version $tool.Value.version
}
& dotnet tool restore
# $tools = Get-Content ".config/dotnet-tools.json" | ConvertFrom-Json
# foreach ($tool in $tools.tools.PsObject.Properties) {
# & dotnet tool install $tool.Name --version $tool.Value.version
# }

# Build Cake arguments
$cakeArguments = @("$Script");
Expand Down
36 changes: 35 additions & 1 deletion docs/design/layout.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,9 +269,43 @@ As an example, take a Grid with `HeightRequest="100"` and `RowDefinitions="*,2*,

## AbsoluteLayout

TK
AbsoluteLayout allows child views to be positioned and sized using explicit values and/or proportionally to the size of the layout.

The layout of a child view in AbsoluteLayout can be specified with a combination of two values:

### LayoutBounds

The layout bounds of a child view is a `Rect` which specifies the position and size of the view. If not specified, the default layout bounds for a view are a position of (0, 0) with the `Width` and `Height` properties set to `AbsoluteLayout.AutoSize` (a constant value of -1).

### LayoutFlags

The layout flags of a child view specify how the values in the layout bounds are used. By default, no flags are specified (`AbsoluteLayoutFlags.None`). The `XProportional` and `YProportional` values can be independently set, or both values can be set at once by setting `PositionProportional`. Likewise, `HeightProportional` and `WidthProportional` can be set independently, or both can be set at once with `SizeProportional`. All flags can be set at once using `AbsoluteLayoutFlags.All`.

### Layout Bounds/Flags Interaction

The layout rules for a child view are determined by a combination of its layout bounds and its layout flags:

#### Position

If the `XProportional`/`YProportional` flags are set, then the X/Y values of the layout bounds are multiplied by the width/height of the AbsoluteLayout to determine the final X/Y coordinate values. For instance, imagine an AbsoluteLayout which is 100 x 100. It has a child with layout bounds of (0.4, 0.6, 20, 20), and the child's `XProportional` and `YProportional` flags are set. The position of that child will be X = (100 * 0.4) = 40 and Y = (100 * 0.6) = 60.

If `XProportional`/`YProportional` flags are not set, then the X and Y values in the layout bounds are explicit values. For instance, imagine an AbsoluteLayout which is 100 x 100. It has a child with layout bounds of (45, 67, 20, 20), and the child's `XProportional` and `YProportional` flags are _not_ set. The position of that child will be X = 45 and Y = 67.

Both explicit and proportional position values _can_ exceed the boundaries of the AbsoluteLayout.

#### Size

If the `WidthProportional`/`HeightProportional` flags are set, then the Width/Height values of the layout bounds are multiplied by the width/height of the AbsoluteLayout to determine the final Width/Height values. For instance, imagine an AbsoluteLayout which is 100 x 100. It has a child with layout bounds of (0, 0, 0.3, 0.47), and the child's `WidthProportional` and `HeightProportional` flags are set. The size of that child will be Width = (100 * 0.3) = 30 and Height = (100 * 0.47) = 47.

If `WidthProportional`/`HeightProportional` flags are not set, then the Width and Height values in the layout bounds are explicit values. For instance, imagine an AbsoluteLayout which is 100 x 100. It has a child with layout bounds of (0, 0, 45, 20), and the child's `WidthProportional` and `HeightProportional` flags are _not_ set. The size of that child will be Width = 45 and Height = 20.

Both explicit and proportional size values _can_ exceed the boundaries of the AbsoluteLayout.

### Unbounded Dimensions

If the AbsoluteLayout is unbounded along a dimension (e.g., if it's a child of a VerticalStackLayout, and is not provided with an explicit height), then the concept of "proportional" along that dimension has no meaning. Proportional flags along those dimensions are ignored; if the layout bounds specifies a non-Auto value along that dimension, it will be used. Otherwise, the automatic size of the view will be used along that dimension.

For example, say an AbsoluteLayout is the child of a VerticalStackLayout with a width of 200. The only child of the AbsoluteLayout has LayoutBounds of (0, 0, 100, 0.5) and has `AbsoluteLayoutFlags.HeightProportional` set. Because the AbsoluteLayout has no vertical constraints, the `AbsoluteLayoutFlags.HeightProportional` flag is ignored, and the child's height is set to the value of 0.5 from its layout bounds.

# The Layout Process

Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/maui-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ jobs:
DOTNET_TOKEN: $(dotnetbuilds-internal-container-read-token)
PRIVATE_BUILD: $(PrivateBuild)

- script: dotnet tool update Microsoft.DotNet.XHarness.CLI --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json --version "8.0.0-prerelease*" -g
displayName: install xharness
# - script: dotnet tool update Microsoft.DotNet.XHarness.CLI --add-source https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json --version "9.0.0-prerelease*" -g
# displayName: install xharness

- pwsh: ./build.ps1 --target=dotnet-integration-build --verbosity=diagnostic
displayName: Build Microsoft.Maui.IntegrationTests
Expand Down
4 changes: 2 additions & 2 deletions eng/pipelines/common/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ variables:
- name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
value: true
- name: DOTNET_VERSION
value: 7.0.401
value: 8.0.101
- name: REQUIRED_XCODE
value: 15.2.0
- name: DEVICETESTS_REQUIRED_XCODE
Expand Down Expand Up @@ -52,7 +52,7 @@ variables:
- name: TeamName
value: Maui
- name: POWERSHELL_VERSION
value: 7.1.3
value: 7.4.0
- name: Codeql.Enabled
value: false
- group: Xamarin-Secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ public override string ToString()
new GalleryPageFactory(() => new FrameCoreGalleryPage(), "Frame Gallery"),
new GalleryPageFactory(() => new ImageButtonCoreGalleryPage(), "Image Button Gallery"),
new GalleryPageFactory(() => new ImageCoreGalleryPage(), "Image Gallery"),
new GalleryPageFactory(() => new LabelCoreGalleryPage(), "Label Gallery"),
new GalleryPageFactory(() => new KeyboardScrollingGridGallery(), "Keyboard Scrolling Gallery - Grid with Star Row"),
new GalleryPageFactory(() => new KeyboardScrollingNonScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - NonScrolling Page / Large Titles"),
new GalleryPageFactory(() => new KeyboardScrollingNonScrollingPageSmallTitlesGallery(), "Keyboard Scrolling Gallery - NonScrolling Page / Small Titles"),
new GalleryPageFactory(() => new KeyboardScrollingScrollingPageLargeTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Large Titles"),
new GalleryPageFactory(() => new KeyboardScrollingScrollingPageSmallTitlesGallery(), "Keyboard Scrolling Gallery - Scrolling Page / Small Titles"),
new GalleryPageFactory(() => new LabelCoreGalleryPage(), "Label Gallery"),
new GalleryPageFactory(() => new ListViewCoreGalleryPage(), "ListView Gallery"),
new GalleryPageFactory(() => new PickerCoreGalleryPage(), "Picker Gallery"),
new GalleryPageFactory(() => new ProgressBarCoreGalleryPage(), "Progress Bar Gallery"),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingEditorsPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingEditorsPage">
<Grid RowDefinitions="*,*">
<Grid Grid.Row="0">
<VerticalStackLayout>
<Editor Placeholder="Editor1" AutomationId="Editor1" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor2" AutomationId="Editor2" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor3" AutomationId="Editor3" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor4" AutomationId="Editor4" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor5" AutomationId="Editor5" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor6" AutomationId="Editor6" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor7" AutomationId="Editor7" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor8" AutomationId="Editor8" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor9" AutomationId="Editor9" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor10" AutomationId="Editor10" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor11" AutomationId="Editor11" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor12" AutomationId="Editor12" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor13" AutomationId="Editor13" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor14" AutomationId="Editor14" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor15" AutomationId="Editor15" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor16" AutomationId="Editor16" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor17" AutomationId="Editor17" Background="lightgray" HeightRequest="50"/>
<Editor Placeholder="Editor18" AutomationId="Editor17" Background="lightgray" HeightRequest="65"/>
</VerticalStackLayout>
</Grid>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingEditorsPage : ContentView
{
public KeyboardScrollingEditorsPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingEntriesPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingEntriesPage"
xmlns:ios="clr-namespace:Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;assembly=Microsoft.Maui.Controls">
<Grid RowDefinitions="*,*">
<Grid Grid.Row="0">
<VerticalStackLayout>
<Entry Placeholder="Entry1" AutomationId="Entry1" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry2" AutomationId="Entry2" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry3" AutomationId="Entry3" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry4" AutomationId="Entry4" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry5" AutomationId="Entry5" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry6" AutomationId="Entry6" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry7" AutomationId="Entry7" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry8" AutomationId="Entry8" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry9" AutomationId="Entry9" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry10" AutomationId="Entry10" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry11" AutomationId="Entry11" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry12" AutomationId="Entry12" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry13" AutomationId="Entry13" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry14" AutomationId="Entry14" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry15" AutomationId="Entry15" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry16" AutomationId="Entry16" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry17" AutomationId="Entry17" Background="lightgray" HeightRequest="50"/>
<Entry Placeholder="Entry18" AutomationId="Entry18" Background="lightgray" HeightRequest="50"/>
</VerticalStackLayout>
</Grid>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingEntriesPage : ContentView
{
public KeyboardScrollingEntriesPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingEntryNextEditorPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingEntryNextEditorPage">
<Grid RowDefinitions="100,100,100,100" RowSpacing="25">
<Entry Placeholder="First Entry" AutomationId="Entry1" Background="lightgray" ReturnType="Next" Grid.Row="0"/>
<Entry Placeholder="Second Entry" AutomationId="Entry2" Background="lightgray" ReturnType="Next" Grid.Row="1"/>
<Entry Placeholder="Third Entry" AutomationId="Entry3" Background="lightgray" ReturnType="Next" Grid.Row="2"/>
<Editor Placeholder="Editor" AutomationId="Editor" Background="lightgray" Grid.Row="3"/>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingEntryNextEditorPage : ContentView
{
public KeyboardScrollingEntryNextEditorPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample;

[Preserve(AllMembers = true)]
public class KeyboardScrollingGridGallery : ContentViewGalleryPage
{
public KeyboardScrollingGridGallery()
{
Content = new KeyboardScrollingGridPage();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentView xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
AutomationId="KeyboardScrollingGridPage"
x:Class="Maui.Controls.Sample.KeyboardScrollingGridPage">
<Grid RowDefinitions="*, Auto">
<VerticalStackLayout Grid.Row="1">
<Entry Placeholder="Entry 1" AutomationId="Entry1"/>
<Entry Placeholder="Entry 2" AutomationId="Entry2"/>
<Entry Placeholder="Entry 3" AutomationId="Entry3"/>
<Entry Placeholder="Entry 4" AutomationId="Entry4"/>
<Entry Placeholder="Entry 5" AutomationId="Entry5"/>
<Entry Placeholder="Entry 6" AutomationId="Entry6"/>
<Entry Placeholder="Entry 7" AutomationId="Entry7"/>
</VerticalStackLayout>
</Grid>
</ContentView>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
using System;
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Xaml;

namespace Maui.Controls.Sample;

[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class KeyboardScrollingGridPage : ContentView
{
public KeyboardScrollingGridPage()
{
InitializeComponent();
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingNonScrollingPageLargeTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingNonScrollingPageLargeTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Always);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return false; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingNonScrollingPageSmallTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingNonScrollingPageSmallTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Never);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return false; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingScrollingPageLargeTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingScrollingPageLargeTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Always);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return true; }
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using Microsoft.Maui.Controls.Internals;
using Microsoft.Maui.Controls.PlatformConfiguration;
using Microsoft.Maui.Controls.PlatformConfiguration.iOSSpecific;

namespace Maui.Controls.Sample
{
[Preserve(AllMembers = true)]
public class KeyboardScrollingScrollingPageSmallTitlesGallery : ContentViewGalleryPage
{
public KeyboardScrollingScrollingPageSmallTitlesGallery()
{
On<iOS>().SetLargeTitleDisplay(LargeTitleDisplayMode.Never);
Add(new KeyboardScrollingEntriesPage());
Add(new KeyboardScrollingEditorsPage());
Add(new KeyboardScrollingEntryNextEditorPage());
}

protected override bool SupportsScroll
{
get { return true; }
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,16 @@ protected override void Build()
Add(htmlLabelContainer);
}

{
var label = new Label
{
Text = "<h1>Broken Html!<h1>",
TextType = TextType.Html
};
var htmlLabelContainer = new ViewContainer<Label>(Test.Label.BrokenHtmlTextType, label);
Add(htmlLabelContainer);
}

{
var label = new Label
{
Expand Down
Loading

0 comments on commit 62ca213

Please sign in to comment.