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
2 changes: 1 addition & 1 deletion Demo/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ public App()
InitializeComponent();
}

protected override Window CreateWindow(IActivationState? activationState) => new Window(new AppShell());
protected override Window CreateWindow(IActivationState? activationState) => new(new AppShell());
}
6 changes: 3 additions & 3 deletions Demo/Pages/AccessibilityTestPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,16 @@ public AccessibilityTestPage()

async void Button_Clicked(object sender, EventArgs e)
{
await DisplayAlert("Clicked", string.Empty, "OK");
await DisplayAlertAsync("Clicked", string.Empty, "OK");
}

async void Example6_Pressed(object sender, EventArgs e)
{
await DisplayAlert("Pressed", string.Empty, "OK");
await DisplayAlertAsync("Pressed", string.Empty, "OK");
}

async void Example6_Released(object sender, EventArgs e)
{
await DisplayAlert("Release", string.Empty, "OK");
await DisplayAlertAsync("Release", string.Empty, "OK");
}
}
4 changes: 2 additions & 2 deletions Demo/Pages/ButtonNotInScrollViewPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ public ButtonNotInScrollViewPage()

async void StateButton_Clicked(object sender, EventArgs e)
{
await DisplayAlert("Clicked", string.Empty, "OK");
await DisplayAlertAsync("Clicked", string.Empty, "OK");
Copy link

Copilot AI Nov 12, 2025

Choose a reason for hiding this comment

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

The method name DisplayAlertAsync does not exist in the standard .NET MAUI ContentPage API. The correct method name is DisplayAlert. This change will cause compilation errors unless a custom extension method exists.

Copilot uses AI. Check for mistakes.
}

async void StateButton_Released(object sender, EventArgs e)
{
await DisplayAlert("Release", string.Empty, "OK");
await DisplayAlertAsync("Release", string.Empty, "OK");
}
}
24 changes: 9 additions & 15 deletions Demo/Pages/EventCommandPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,53 +9,47 @@ public EventCommandPage()

async void StateButton_OnClicked(object sender, EventArgs e)
{
await DisplayAlert("Clicked event", "Button clicked", "OK");
await DisplayAlertAsync("Clicked event", "Button clicked", "OK");
}

async void StateButton_OnPressed(object sender, EventArgs e)
{
await DisplayAlert("Pressed event", "Button pressed", "OK");
await DisplayAlertAsync("Pressed event", "Button pressed", "OK");
}

async void StateButton_OnReleased(object sender, EventArgs e)
{
await DisplayAlert("Released event", "Button released", "OK");
await DisplayAlertAsync("Released event", "Button released", "OK");
}

void TapGestureRecognizer_OnTapped(object sender, EventArgs e)
{
Label? textExtender = sender as Label;

if(Description.MaxLines == int.MaxValue)
if (Description.MaxLines == int.MaxValue)
{
Description.MaxLines = 3;
if(textExtender is not null)
{
textExtender.Text = "See more..";
}
textExtender?.Text = "See more..";
}
else
{
Description.MaxLines = int.MaxValue;
if(textExtender is not null)
{
textExtender.Text = "See less...";
}
textExtender?.Text = "See less...";
}
}

async void Card_OnClicked(object sender, EventArgs e)
{
await DisplayAlert("Card click", string.Empty, "OK");
await DisplayAlertAsync("Card click", string.Empty, "OK");
}

async void Button_OnClicked(object sender, EventArgs e)
{
await DisplayAlert("XF button clicked", string.Empty, "OK");
await DisplayAlertAsync("XF button clicked", string.Empty, "OK");
}

async void NestButton_OnClicked(object sender, EventArgs e)
{
await DisplayAlert("Nested state button clicked", string.Empty, "OK");
await DisplayAlertAsync("Nested state button clicked", string.Empty, "OK");
}
}
4 changes: 1 addition & 3 deletions Demo/Platforms/Android/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@
namespace App;

[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
public class MainActivity : MauiAppCompatActivity;
6 changes: 1 addition & 5 deletions Demo/Platforms/Android/MainApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@
namespace App;

[Application]
public class MainApplication : MauiApplication
public class MainApplication(IntPtr handle, JniHandleOwnership ownership) : MauiApplication(handle, ownership)
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership) : base(handle, ownership)
{
}

protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
8 changes: 3 additions & 5 deletions Demo/ViewModels/TestViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using CommunityToolkit.Mvvm.Input;

namespace App.ViewModels;

[INotifyPropertyChanged]
public partial class TestViewModel
{
[RelayCommand]
Expand All @@ -27,9 +25,9 @@ static async Task Released()
static async Task Alert(string title, string message)
{
Page? mainPage = Application.Current?.Windows[0].Page;
if(mainPage is not null)
if (mainPage is not null)
{
await mainPage.DisplayAlert(title, message, "OK");
await mainPage.DisplayAlertAsync(title, message, "OK");
}
}
}
4 changes: 1 addition & 3 deletions Scr/Handler/IStateButtonHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace IeuanWalker.Maui.StateButton.Handler;

public interface IStateButtonHandler : IBorderHandler
{
}
public interface IStateButtonHandler : IBorderHandler;
4 changes: 1 addition & 3 deletions Scr/Handler/StateButtonHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace IeuanWalker.Maui.StateButton.Handler;

public partial class StateButtonHandler : BorderHandler, IStateButtonHandler
{
}
public partial class StateButtonHandler : BorderHandler, IStateButtonHandler;
Loading