Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 8 additions & 44 deletions src/Controls/src/Core/Hosting/AppHostBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,60 +74,24 @@ internal static IMauiHandlersCollection AddControlsHandlers(this IMauiHandlersCo
if (RuntimeFeature.IsMaterial3Enabled)
{
handlersCollection.AddHandler<Label, LabelHandler2>();
}
else
{
handlersCollection.AddHandler<Label, LabelHandler>();
}
#else
handlersCollection.AddHandler<Label, LabelHandler>();
#endif
#if ANDROID
if (RuntimeFeature.IsMaterial3Enabled)
{
handlersCollection.AddHandler<Editor, EditorHandler2>();
}
else
{
handlersCollection.AddHandler<Editor, EditorHandler>();
}
#else
handlersCollection.AddHandler<Editor, EditorHandler>();
#endif
#if ANDROID
if (RuntimeFeature.IsMaterial3Enabled)
{
handlersCollection.AddHandler<Picker, PickerHandler2>();
}
else
{
handlersCollection.AddHandler<Picker, PickerHandler>();
}
#else
handlersCollection.AddHandler<Picker, PickerHandler>();
#endif
#if ANDROID
if (RuntimeFeature.IsMaterial3Enabled)
{
handlersCollection.AddHandler<RadioButton, RadioButtonHandler2>();
}
else
{
handlersCollection.AddHandler<RadioButton, RadioButtonHandler>();
}
#else
handlersCollection.AddHandler<RadioButton, RadioButtonHandler>();
#endif
#if ANDROID
if (RuntimeFeature.IsMaterial3Enabled)
{
handlersCollection.AddHandler<TimePicker, TimePickerHandler2>();
}
else
{
handlersCollection.AddHandler<Label, LabelHandler>();
handlersCollection.AddHandler<Editor, EditorHandler>();
handlersCollection.AddHandler<Picker, PickerHandler>();
handlersCollection.AddHandler<RadioButton, RadioButtonHandler>();
handlersCollection.AddHandler<TimePicker, TimePickerHandler>();
}
#else
handlersCollection.AddHandler<Label, LabelHandler>();
handlersCollection.AddHandler<Editor, EditorHandler>();
handlersCollection.AddHandler<Picker, PickerHandler>();
handlersCollection.AddHandler<RadioButton, RadioButtonHandler>();
handlersCollection.AddHandler<TimePicker, TimePickerHandler>();
#endif
handlersCollection.AddHandler<Application, ApplicationHandler>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,11 +124,10 @@ await CreateHandlerAndAddToWindow<DatePickerHandler>(datePicker, async (handler)
await InvokeOnMainThreadAsync(() =>
{
#if ANDROID
if (handler.DatePickerDialog != null)
{
var previousDate = handler.VirtualView.Date;
handler.VirtualView.Date = newDate;
}
// Note: handler.DatePickerDialog may be null if ResetDialog() was called
// during the initial mapper pass (PR #33687), but setting VirtualView.Date
// fires the DateSelected event regardless of dialog state.
handler.VirtualView.Date = newDate;
#elif IOS
if (handler.DatePickerDialog != null)
{
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -173,21 +173,8 @@ public void VerifyFlyoutPage_IsGestureEnabledFalse_FlyoutBehaviorPopover()
}
#endif

[Test, Order(7)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_IsEnabled()
{
App.WaitForElement(Options);
App.Tap(Options);
App.WaitForElement(IsEnabledFalse);
App.Tap(IsEnabledFalse);
App.WaitForElement(Apply);
App.Tap(Apply);
VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));
}

#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST // Issue Link: https://github.com/dotnet/maui/issues/26726
[Test, Order(8)]
[Test, Order(7)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_IsFlowDirectionRTL()
{
Expand All @@ -201,7 +188,7 @@ public void VerifyFlyoutPage_IsFlowDirectionRTL()
}

#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/31374, https://github.com/dotnet/maui/issues/31372
[Test, Order(9)]
[Test, Order(8)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_IsFlowDirectionRTLWithIsPresented()
{
Expand All @@ -219,7 +206,7 @@ public void VerifyFlyoutPage_IsFlowDirectionRTLWithIsPresented()
#endif

#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS // Orientation not supported in Catalyst and Windows , Android Issue Link: https://github.com/dotnet/maui/issues/31374
[Test, Order(10)]
[Test, Order(9)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_IsPresented_OrientationLandscape()
{
Expand All @@ -237,7 +224,7 @@ public void VerifyFlyoutPage_IsPresented_OrientationLandscape()
}
#endif

[Test, Order(11)]
[Test, Order(10)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_Title()
{
Expand All @@ -251,7 +238,7 @@ public void VerifyFlyoutPage_Title()
}

#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST// FlyoutLayoutBehavior is not changed in mobile platforms, Issue Link: https://github.com/dotnet/maui/issues/16245
[Test, Order(12)]
[Test, Order(11)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_FlyoutLayoutBehavior_Split()
{
Expand All @@ -265,7 +252,7 @@ public void VerifyFlyoutPage_FlyoutLayoutBehavior_Split()
}

#if TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/31390
[Test, Order(13)]
[Test, Order(12)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_FlyoutLayoutBehavior_SplitOnPortrait()
{
Expand All @@ -281,7 +268,7 @@ public void VerifyFlyoutPage_FlyoutLayoutBehavior_SplitOnPortrait()
#endif

#if TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/31390
[Test, Order(14)]
[Test, Order(13)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_FlyoutLayoutBehaviorPopover()
{
Expand All @@ -296,7 +283,7 @@ public void VerifyFlyoutPage_FlyoutLayoutBehaviorPopover()
#endif

#if TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/20088
[Test, Order(15)]
[Test, Order(14)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_Detail()
{
Expand All @@ -307,7 +294,7 @@ public void VerifyFlyoutPage_Detail()
App.Tap("BackToOriginalDetailButton1");
}

[Test, Order(16)]
[Test, Order(15)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_Flyout()
{
Expand All @@ -324,7 +311,7 @@ public void VerifyFlyoutPage_Flyout()

#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // Android Issue Link: https://github.com/dotnet/maui/issues/22116 , https://github.com/dotnet/maui/issues/15211
// Windows Issue Link: https://github.com/dotnet/maui/issues/15211#issuecomment-1562587775 , https://github.com/dotnet/maui/issues/31390
[Test, Order(17)]
[Test, Order(16)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_DetailPageIconImageSource()
{
Expand All @@ -337,7 +324,7 @@ public void VerifyFlyoutPage_DetailPageIconImageSource()
VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));
}

[Test, Order(18)]
[Test, Order(17)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_DetailPageIconImageSource_FlyoutLayoutBehavior()
{
Expand All @@ -354,7 +341,7 @@ public void VerifyFlyoutPage_DetailPageIconImageSource_FlyoutLayoutBehavior()
#endif

#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // Issue Link: https://github.com/dotnet/maui/issues/31390, https://github.com/dotnet/maui/issues/31374
[Test, Order(19)]
[Test, Order(18)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_FlyoutLayoutBehaviorPopover_IsPresented()
{
Expand All @@ -373,7 +360,7 @@ public void VerifyFlyoutPage_FlyoutLayoutBehaviorPopover_IsPresented()
}
#endif

[Test, Order(20)]
[Test, Order(19)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyDynamicFlyoutPage()
{
Expand All @@ -384,7 +371,7 @@ public void VerifyDynamicFlyoutPage()
App.Tap("CloseNewFlyoutPageButton");
}

[Test, Order(21)]
[Test, Order(20)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_BackgroundColor()
{
Expand All @@ -397,7 +384,7 @@ public void VerifyFlyoutPage_BackgroundColor()
VerifyScreenshot(tolerance: 0.5, retryTimeout: TimeSpan.FromSeconds(2));
}

[Test, Order(22)]
[Test, Order(21)]
[Category(UITestCategories.FlyoutPage)]
public void VerifyFlyoutPage_IsVisible()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -958,6 +958,10 @@ public void VerifyShellFlyout_FlyoutIsPresented()
[Category(UITestCategories.Shell)]
public void VerifyShellFlyout_FlyoutBehaviorLocked()
{
if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp))
{
Assert.Ignore("Ignored due to a bug issue in iOS 26"); // Issue Link: https://github.com/dotnet/maui/issues/34330
}
App.WaitForElement(Options);
App.Tap(Options);
App.WaitForElement("FlyoutBehaviorLocked");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@ public void ProgrammaticScrollToWorksWithHorizontalLayout()
{
App.WaitForElement("ScrollToButton");
App.Tap("ScrollToButton");
#if WINDOWS
App.WaitForElement("Item_15");
App.WaitForElement("Item_25");
#else
var firstIndexText = App.FindElement("IndexLabel").GetText();
Assert.That(firstIndexText, Is.EqualTo("The CollectionView is scrolled"));
#endif
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Diff not rendered.
Diff not rendered.
2 changes: 0 additions & 2 deletions src/Core/src/Platform/Windows/NavigationRootManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,6 @@ public virtual void Disconnect()

SetToolbar(null);

_rootView.SetTitleBar(null, null);

_rootView.AppWindowId = null;

if (_rootView.Content is RootNavigationView navView)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public async Task MinimumDateInitializesCorrectly()

var values = await GetValueAsync(datePicker, (handler) =>
{
EnsureDialogCreated(datePicker, handler);
return new
{
ViewValue = datePicker.MinimumDate,
Expand Down Expand Up @@ -50,6 +51,7 @@ public async Task MaximumDateInitializesCorrectly()

var values = await GetValueAsync(datePicker, (handler) =>
{
EnsureDialogCreated(datePicker, handler);
return new
{
ViewValue = datePicker.MaximumDate,
Expand Down Expand Up @@ -126,5 +128,21 @@ double GetNativeCharacterSpacing(DatePickerHandler datePickerHandler)
var mauiDatePicker = GetNativeDatePicker(datePickerHandler);
return mauiDatePicker.LetterSpacing;
}


/// <summary>
/// The DatePickerDialog is lazily created after PR #33687 — setting MinimumDate or
/// MaximumDate calls ResetDialog() which nulls the dialog reference. The dialog is
/// only recreated when ShowPickerDialog() runs. This helper opens and immediately
/// closes the picker to force dialog creation so that min/max values can be read
/// from the native DatePicker widget.
/// </summary>
void EnsureDialogCreated(DatePickerStub datePicker, DatePickerHandler handler)
{
datePicker.IsOpen = true;
handler.UpdateValue(nameof(IDatePicker.IsOpen));
datePicker.IsOpen = false;
handler.UpdateValue(nameof(IDatePicker.IsOpen));
}
}
}
Loading