-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
c6ef290
commit 3fa6bf4
Showing
5 changed files
with
36 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,13 @@ | ||
using System; | ||
using System.Threading.Tasks; | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Handlers; | ||
using Microsoft.Maui.Controls.Hosting; | ||
using Microsoft.Maui.Devices; | ||
using Microsoft.Maui.DeviceTests.Stubs; | ||
using Microsoft.Maui.Graphics; | ||
using Microsoft.Maui.Handlers; | ||
using Microsoft.Maui.Hosting; | ||
using Microsoft.Maui.Platform; | ||
using Xunit; | ||
#if ANDROID || IOS || MACCATALYST | ||
using ShellHandler = Microsoft.Maui.Controls.Handlers.Compatibility.ShellRenderer; | ||
#endif | ||
|
||
namespace Microsoft.Maui.DeviceTests | ||
{ | ||
public static class Extensions | ||
{ | ||
public static Task Wait(this Image image, int timeout = 1000) => | ||
AssertionExtensions.Wait(() => !image.IsLoading, timeout); | ||
|
||
public static void SetupShellHandlers(this MauiAppBuilder builder) | ||
{ | ||
builder.ConfigureMauiHandlers(SetupShellHandlers); | ||
} | ||
|
||
public static void SetupShellHandlers(this IMauiHandlersCollection handlers) | ||
{ | ||
handlers.TryAddHandler(typeof(Controls.Shell), typeof(ShellHandler)); | ||
handlers.TryAddHandler<Layout, LayoutHandler>(); | ||
handlers.TryAddHandler<Image, ImageHandler>(); | ||
handlers.TryAddHandler<Label, LabelHandler>(); | ||
handlers.TryAddHandler<Page, PageHandler>(); | ||
handlers.TryAddHandler(typeof(Toolbar), typeof(ToolbarHandler)); | ||
handlers.TryAddHandler(typeof(MenuBar), typeof(MenuBarHandler)); | ||
handlers.TryAddHandler(typeof(MenuBarItem), typeof(MenuBarItemHandler)); | ||
handlers.TryAddHandler(typeof(MenuFlyoutItem), typeof(MenuFlyoutItemHandler)); | ||
handlers.TryAddHandler(typeof(MenuFlyoutSubItem), typeof(MenuFlyoutSubItemHandler)); | ||
handlers.TryAddHandler<ScrollView, ScrollViewHandler>(); | ||
|
||
#if WINDOWS | ||
handlers.TryAddHandler(typeof(ShellItem), typeof(ShellItemHandler)); | ||
handlers.TryAddHandler(typeof(ShellSection), typeof(ShellSectionHandler)); | ||
handlers.TryAddHandler(typeof(ShellContent), typeof(ShellContentHandler)); | ||
#endif | ||
} | ||
} | ||
} | ||
|
77 changes: 0 additions & 77 deletions
77
src/Controls/tests/DeviceTests/TestCases/ControlsPageTypesTestCases.cs
This file was deleted.
Oops, something went wrong.