diff --git a/src/Maui/Prism.Maui/AppModel/IPageLifecycleAware.cs b/src/Maui/Prism.Maui/AppModel/IPageLifecycleAware.cs
index 8885f5909..cbc41127e 100644
--- a/src/Maui/Prism.Maui/AppModel/IPageLifecycleAware.cs
+++ b/src/Maui/Prism.Maui/AppModel/IPageLifecycleAware.cs
@@ -1,7 +1,17 @@
namespace Prism.AppModel;
+///
+/// Interface that defines lifecycle events for pages.
+///
public interface IPageLifecycleAware
{
+ ///
+ /// Called when the page is appearing.
+ ///
void OnAppearing();
+
+ ///
+ /// Called when the page is disappearing.
+ ///
void OnDisappearing();
}
diff --git a/src/Maui/Prism.Maui/Behaviors/PageLifeCycleAwareBehavior.cs b/src/Maui/Prism.Maui/Behaviors/PageLifeCycleAwareBehavior.cs
index 2d6c06e51..a952c0e1f 100644
--- a/src/Maui/Prism.Maui/Behaviors/PageLifeCycleAwareBehavior.cs
+++ b/src/Maui/Prism.Maui/Behaviors/PageLifeCycleAwareBehavior.cs
@@ -3,8 +3,12 @@
namespace Prism.Behaviors;
+///
+/// Provides lifecycle events for and ViewModels.
+///
public class PageLifeCycleAwareBehavior : BehaviorBase
{
+ ///
protected override void OnAttachedTo(Page bindable)
{
base.OnAttachedTo(bindable);
@@ -12,6 +16,7 @@ protected override void OnAttachedTo(Page bindable)
bindable.Disappearing += OnDisappearing;
}
+ ///
protected override void OnDetachingFrom(Page bindable)
{
base.OnDetachingFrom(bindable);
diff --git a/src/Maui/Prism.Maui/Behaviors/PageScopeBehavior.cs b/src/Maui/Prism.Maui/Behaviors/PageScopeBehavior.cs
index 4fe131302..ce2540ec6 100644
--- a/src/Maui/Prism.Maui/Behaviors/PageScopeBehavior.cs
+++ b/src/Maui/Prism.Maui/Behaviors/PageScopeBehavior.cs
@@ -7,6 +7,7 @@ namespace Prism.Behaviors;
///
public sealed class PageScopeBehavior : BehaviorBase
{
+ ///
protected override void OnAttachedTo(Page page)
{
base.OnAttachedTo(page);
@@ -14,6 +15,7 @@ protected override void OnAttachedTo(Page page)
Navigation.Xaml.Navigation.GetNavigationService(page);
}
+ ///
protected override void OnDetachingFrom(Page page)
{
base.OnDetachingFrom(page);
diff --git a/src/Maui/Prism.Maui/Behaviors/TabbedPageActiveAwareBehavior.cs b/src/Maui/Prism.Maui/Behaviors/TabbedPageActiveAwareBehavior.cs
index 8e1775fcc..bee87f2b5 100644
--- a/src/Maui/Prism.Maui/Behaviors/TabbedPageActiveAwareBehavior.cs
+++ b/src/Maui/Prism.Maui/Behaviors/TabbedPageActiveAwareBehavior.cs
@@ -1,5 +1,8 @@
namespace Prism.Behaviors;
+///
+/// Provides support for the children of the
+///
public class TabbedPageActiveAwareBehavior : MultiPageActiveAwareBehavior
{
}
diff --git a/src/Maui/Prism.Maui/Dialogs/DialogViewRegistry.cs b/src/Maui/Prism.Maui/Dialogs/DialogViewRegistry.cs
index 2df7fc3b9..1edd79622 100644
--- a/src/Maui/Prism.Maui/Dialogs/DialogViewRegistry.cs
+++ b/src/Maui/Prism.Maui/Dialogs/DialogViewRegistry.cs
@@ -1,15 +1,26 @@
-using Prism.Ioc;
-using Prism.Mvvm;
+using Prism.Mvvm;
namespace Prism.Dialogs;
+///
+/// Implementation of a view registry specifically for dialog views.
+///
public class DialogViewRegistry : ViewRegistryBase, IDialogViewRegistry
{
+ ///
+ /// Initializes a new instance of the class with the specified view registrations.
+ ///
+ /// The collection of view registrations to manage.
public DialogViewRegistry(IEnumerable registrations)
: base(ViewType.Dialog, registrations)
{
}
+ ///
+ /// Configures a dialog view with the specified context and container provider.
+ ///
+ /// The bindable object representing the dialog view to configure.
+ /// The container provider to use for resolving dependencies.
protected override void ConfigureView(BindableObject bindable, IContainerProvider container)
{
}
diff --git a/src/Maui/Prism.Maui/Dialogs/IDialogViewRegistry.cs b/src/Maui/Prism.Maui/Dialogs/IDialogViewRegistry.cs
index af6e6eb7b..fc6f7f0a0 100644
--- a/src/Maui/Prism.Maui/Dialogs/IDialogViewRegistry.cs
+++ b/src/Maui/Prism.Maui/Dialogs/IDialogViewRegistry.cs
@@ -2,6 +2,9 @@
namespace Prism.Dialogs;
+///
+/// Interface that defines a registry for managing views specific to dialogs.
+///
public interface IDialogViewRegistry : IViewRegistry
{
}
diff --git a/src/Maui/Prism.Maui/Dialogs/KnownDialogParameters.cs b/src/Maui/Prism.Maui/Dialogs/KnownDialogParameters.cs
index fe762355c..7c7f6bde5 100644
--- a/src/Maui/Prism.Maui/Dialogs/KnownDialogParameters.cs
+++ b/src/Maui/Prism.Maui/Dialogs/KnownDialogParameters.cs
@@ -1,9 +1,18 @@
namespace Prism.Dialogs;
+///
+/// Provides well-known parameter names used for configuring dialogs.
+///
public static class KnownDialogParameters
{
+ ///
+ /// Parameter name used to control whether a dialog should close when the background is tapped.
+ ///
public const string CloseOnBackgroundTapped = "closeOnBackgroundTapped";
+ ///
+ /// Parameter name used to pass additional custom parameters to a dialog.
+ ///
public const string XamlParam = "xamlParam";
}
diff --git a/src/Maui/Prism.Maui/Dialogs/Xaml/DialogLayout.cs b/src/Maui/Prism.Maui/Dialogs/Xaml/DialogLayout.cs
index 4a828e9eb..12526916d 100644
--- a/src/Maui/Prism.Maui/Dialogs/Xaml/DialogLayout.cs
+++ b/src/Maui/Prism.Maui/Dialogs/Xaml/DialogLayout.cs
@@ -133,11 +133,8 @@ public static void SetMask(BindableObject bindable, View value) =>
/// True if a mask is used for the dialog, false if not, or null if not explicitly set.
public static bool? GetUseMask(BindableObject bindable)
{
- var value = bindable.GetValue(UseMaskProperty);
- if (value is bool boolean)
- return boolean;
-
- return true; // Default to using a mask if not explicitly set
+ // Default to using a mask if not explicitly set
+ return bindable.GetValue(UseMaskProperty) is bool boolean ? boolean : true;
}
///
diff --git a/src/Prism.Core/Common/MulticastExceptionHandler.cs b/src/Prism.Core/Common/MulticastExceptionHandler.cs
index 6254f9fc5..8394ed59a 100644
--- a/src/Prism.Core/Common/MulticastExceptionHandler.cs
+++ b/src/Prism.Core/Common/MulticastExceptionHandler.cs
@@ -1,4 +1,4 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Threading.Tasks;
@@ -62,17 +62,15 @@ public async Task HandleAsync(Exception exception, object? parameter = null)
return;
// Get Invoke() method of the delegate
- var invokeMethod = multicastDelegate.GetType().GetMethod("Invoke");
-
- if (invokeMethod == null)
- throw new InvalidOperationException($"Could not find Invoke() method for delegate of type {multicastDelegate.GetType().Name}");
+ var invokeMethod = multicastDelegate.GetType().GetMethod("Invoke")
+ ?? throw new InvalidOperationException($"Could not find Invoke() method for delegate of type {multicastDelegate.GetType().Name}");
var parameters = invokeMethod.GetParameters();
var arguments = parameters.Length switch
{
0 => Array.Empty