Hi Team,
I have a basic login page, I'm running the app on iOS simualtor and developing the code in VS2022 on windows machine. The App crashes as soon as I focus the mouse on the Email text box. I have registered Unhandled Exception event, but the event is not firing. Will you please guide me in resolving this issue.
AppDomain.CurrentDomain.UnhandledException += HandleUnhandledException;
private void HandleUnhandledException(object sender, UnhandledExceptionEventArgs e)
{
// Log or handle the exception here
Exception ex = (Exception)e.ExceptionObject;
HandleError(ex, "App.HandleUnhandledException");
}
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="using:Biome.ViewModels"
x:Class="Biome.LoginPage"
x:DataType="viewModels:LoginViewModel">
<ContentPage.BindingContext>
<viewModels:LoginViewModel />
</ContentPage.BindingContext>
<VerticalStackLayout Padding="30,0" Spacing="25">
<Image Source="biome.png" HeightRequest="185" Aspect="AspectFit" SemanticProperties.Description="biome" />
<Grid HorizontalOptions="Center" VerticalOptions="Center">
<Grid.RowDefinitions>
<RowDefinition Height="45"></RowDefinition>
<RowDefinition Height="5"></RowDefinition>
<RowDefinition Height="45"></RowDefinition>
<RowDefinition Height="5"></RowDefinition>
<RowDefinition Height="45"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="500"></ColumnDefinition>
</Grid.ColumnDefinitions>
<Entry Grid.Row="0" Placeholder="Email Address" Text="{Binding LoginModel.Email}" />
<Entry Grid.Row="2" Placeholder="Password" IsPassword="True" Text="{Binding LoginModel.Password}" />
<Button Grid.Row="4" Text="Login" Command="{Binding LoginCommand}" />
</Grid>
</VerticalStackLayout>
</ContentPage>
Thanks