diff --git a/src/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs b/src/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs index d31cf046d6..6f7adfc329 100644 --- a/src/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs +++ b/src/Wpf/Prism.Unity.Wpf/Legacy/UnityBootstrapper.cs @@ -179,6 +179,10 @@ protected virtual IUnityContainer CreateContainer() return new UnityContainer(); } + /// + /// Creates the used by Prism. + /// + /// The container extension. protected override IContainerExtension CreateContainerExtension() { return new UnityContainerExtension(Container); diff --git a/src/Wpf/Prism.Unity.Wpf/Legacy/UnityExtensions.cs b/src/Wpf/Prism.Unity.Wpf/Legacy/UnityExtensions.cs index 98cfc517bc..cb8a34d2b6 100644 --- a/src/Wpf/Prism.Unity.Wpf/Legacy/UnityExtensions.cs +++ b/src/Wpf/Prism.Unity.Wpf/Legacy/UnityExtensions.cs @@ -4,6 +4,9 @@ namespace Prism.Unity { + /// + /// extensions. + /// public static class UnityExtensions { /// diff --git a/src/Wpf/Prism.Unity.Wpf/PrismApplication.cs b/src/Wpf/Prism.Unity.Wpf/PrismApplication.cs index be4c933266..5bc0e791e4 100644 --- a/src/Wpf/Prism.Unity.Wpf/PrismApplication.cs +++ b/src/Wpf/Prism.Unity.Wpf/PrismApplication.cs @@ -4,13 +4,24 @@ namespace Prism.Unity { + /// + /// Base application class that uses as it's container. + /// public abstract class PrismApplication : PrismApplicationBase { + /// + /// Create a new used by Prism. + /// + /// A new . protected override IContainerExtension CreateContainerExtension() { return new UnityContainerExtension(); } + /// + /// Registers the s of the Exceptions that are not considered + /// root exceptions by the . + /// protected override void RegisterFrameworkExceptionTypes() { ExceptionExtensions.RegisterFrameworkExceptionType(typeof(ResolutionFailedException)); diff --git a/src/Wpf/Prism.Wpf/Bootstrapper.cs b/src/Wpf/Prism.Wpf/Bootstrapper.cs index 234e3b747c..09d6f19347 100644 --- a/src/Wpf/Prism.Wpf/Bootstrapper.cs +++ b/src/Wpf/Prism.Wpf/Bootstrapper.cs @@ -48,7 +48,7 @@ public abstract class Bootstrapper /// /// Creates the container extension used by Prism. /// - /// The container extension + /// The container extension. protected abstract IContainerExtension CreateContainerExtension(); /// diff --git a/src/Wpf/Prism.Wpf/Common/MvvmHelpers.cs b/src/Wpf/Prism.Wpf/Common/MvvmHelpers.cs index b5fc95b988..90b310dd0f 100644 --- a/src/Wpf/Prism.Wpf/Common/MvvmHelpers.cs +++ b/src/Wpf/Prism.Wpf/Common/MvvmHelpers.cs @@ -10,8 +10,20 @@ namespace Prism.Common { + /// + /// Helper class for MVVM. + /// public static class MvvmHelpers { + /// + /// Perform an on a view and viewmodel. + /// + /// + /// The action will be performed on the view and its viewmodel if they implement . + /// + /// The parameter type. + /// The view to perform the on. + /// The to perform. public static void ViewAndViewModelAction(object view, Action action) where T : class { T viewAsT = view as T; @@ -28,6 +40,16 @@ public static void ViewAndViewModelAction(object view, Action action) wher } } + /// + /// Get an implementer from a view or viewmodel. + /// + /// + /// If the view implements it will be returned. + /// Otherwise if the view's datacontext implements it will be returned instead. + /// + /// The implementer type to get. + /// The view to get from. + /// view or viewmodel as . public static T GetImplementerFromViewOrViewModel(object view) where T : class { T viewAsT = view as T; diff --git a/src/Wpf/Prism.Wpf/Interactivity/CommandBehaviorBase.cs b/src/Wpf/Prism.Wpf/Interactivity/CommandBehaviorBase.cs index 17f9e920a1..967907b4ce 100644 --- a/src/Wpf/Prism.Wpf/Interactivity/CommandBehaviorBase.cs +++ b/src/Wpf/Prism.Wpf/Interactivity/CommandBehaviorBase.cs @@ -13,7 +13,7 @@ namespace Prism.Interactivity /// /// Base behavior to handle connecting a to a Command. /// - /// The target object must derive from Control + /// The target object must derive from Control. /// /// CommandBehaviorBase can be used to provide new behaviors for commands. /// @@ -36,6 +36,10 @@ public CommandBehaviorBase(T targetObject) } bool _autoEnabled = true; + /// + /// If true the target object's IsEnabled property will update based on the commands ability to execute. + /// If false the target object's IsEnabled property will not update. + /// public bool AutoEnable { get { return _autoEnabled; } @@ -47,7 +51,7 @@ public bool AutoEnable } /// - /// Corresponding command to be execute and monitored for + /// Corresponding command to be execute and monitored for . /// public ICommand Command { @@ -69,7 +73,7 @@ public ICommand Command } /// - /// The parameter to supply the command during execution + /// The parameter to supply the command during execution. /// public object CommandParameter { @@ -124,7 +128,7 @@ private void CommandCanExecuteChanged(object sender, EventArgs e) } /// - /// Executes the command, if it's set, providing the + /// Executes the command, if it's set, providing the . /// protected virtual void ExecuteCommand(object parameter) { diff --git a/src/Wpf/Prism.Wpf/Ioc/IContainerRegistryExtensions.cs b/src/Wpf/Prism.Wpf/Ioc/IContainerRegistryExtensions.cs index 206de94901..80df9ba320 100644 --- a/src/Wpf/Prism.Wpf/Ioc/IContainerRegistryExtensions.cs +++ b/src/Wpf/Prism.Wpf/Ioc/IContainerRegistryExtensions.cs @@ -3,6 +3,9 @@ namespace Prism.Ioc { + /// + /// extensions. + /// public static class IContainerRegistryExtensions { /// diff --git a/src/Wpf/Prism.Wpf/Logging/TextLogger.cs b/src/Wpf/Prism.Wpf/Logging/TextLogger.cs index ffb9d3df97..2baab33c6d 100644 --- a/src/Wpf/Prism.Wpf/Logging/TextLogger.cs +++ b/src/Wpf/Prism.Wpf/Logging/TextLogger.cs @@ -10,6 +10,9 @@ namespace Prism.Logging /// public class TextLogger : ILoggerFacade, IDisposable { + /// + /// A that writes to console output. + /// public TextWriter Writer { get; set; } = Console.Out; /// diff --git a/src/Wpf/Prism.Wpf/Modularity/IModuleCatalogExtensions.cs b/src/Wpf/Prism.Wpf/Modularity/IModuleCatalogExtensions.cs index de9d8f7b13..91ceb9b326 100644 --- a/src/Wpf/Prism.Wpf/Modularity/IModuleCatalogExtensions.cs +++ b/src/Wpf/Prism.Wpf/Modularity/IModuleCatalogExtensions.cs @@ -1,16 +1,19 @@ -using System; +using System; using Prism.Properties; namespace Prism.Modularity { + /// + /// extensions. + /// public static class IModuleCatalogExtensions { /// - /// Adds the module. + /// Adds the module to the . /// - /// Catalog - /// - /// Collection of module names () of the modules on which the module to be added logically depends on. + /// The catalog to add the module to. + /// The to use. + /// Collection of module names () of the modules on which the module to be added logically depends on. /// The type parameter. /// The same instance with the added module. public static IModuleCatalog AddModule(this IModuleCatalog catalog, InitializationMode mode = InitializationMode.WhenAvailable, params string[] dependsOn) @@ -20,12 +23,12 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, Initializ } /// - /// Adds the module. + /// Adds the module to the . /// - /// Catalog. - /// Name. - /// . - /// Collection of module names () of the modules on which the module to be added logically depends on. + /// The catalog to add the module to. + /// Name of the module to be added. + /// The to use. + /// Collection of module names () of the modules on which the module to be added logically depends on. /// The type parameter. /// The same instance with the added module. public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name, InitializationMode mode = InitializationMode.WhenAvailable, params string[] dependsOn) @@ -37,7 +40,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string na /// /// Adds a groupless to the catalog. /// - /// Catalog. + /// The catalog to add the module to. /// of the module to be added. /// Collection of module names () of the modules on which the module to be added logically depends on. /// The same instance with the added module. @@ -49,7 +52,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, Type moduleT /// /// Adds a groupless to the catalog. /// - /// Catalog. + /// The catalog to add the module to. /// of the module to be added. /// Stage on which the module to be added will be initialized. /// Collection of module names () of the modules on which the module to be added logically depends on. @@ -63,12 +66,12 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, Type moduleT } /// - /// Adds a groupless to the catalog. + /// Adds a groupless to the catalog. /// + /// The catalog to add the module to. /// Name of the module to be added. - /// Catalog. /// of the module to be added. - /// Collection of module names () of the modules on which the module to be added logically depends on. + /// Collection of module names () of the modules on which the module to be added logically depends on. /// The same instance with the added module. public static IModuleCatalog AddModule(this IModuleCatalog catalog, string moduleName, string moduleType, params string[] dependsOn) { @@ -78,7 +81,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string modul /// /// Adds a groupless to the catalog. /// - /// Catalog. + /// The catalog to add the module to. /// Name of the module to be added. /// of the module to be added. /// Stage on which the module to be added will be initialized. @@ -92,7 +95,7 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string modul /// /// Adds a groupless to the catalog. /// - /// Catalog. + /// The catalog to add the module to. /// Name of the module to be added. /// of the module to be added. /// Reference to the location of the module to be added assembly. @@ -116,22 +119,21 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string modul } /// - /// Adds the module. + /// Adds the module to the . /// - /// Catalog - /// + /// The catalog to add the module to. + /// The to use. /// The type parameter. /// The same instance with the added module. public static IModuleCatalog AddModule(this IModuleCatalog catalog, InitializationMode mode = InitializationMode.WhenAvailable) where T : IModule => catalog.AddModule(typeof(T).Name, mode); - /// - /// Adds the module. + /// Adds the module to the . /// - /// Catalog - /// Name. + /// The catalog to add the module to. + /// Name of the module to be added. /// The type parameter. /// The same instance with the added module. public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name) @@ -139,11 +141,11 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string na catalog.AddModule(name, InitializationMode.WhenAvailable); /// - /// Adds the module. + /// Adds the module to the . /// - /// Catalog. - /// Name. - /// . + /// The catalog to add the module to. + /// Name of the module to be added. + /// The to use. /// The type parameter. /// The same instance with the added module. public static IModuleCatalog AddModule(this IModuleCatalog catalog, string name, InitializationMode mode) @@ -153,11 +155,11 @@ public static IModuleCatalog AddModule(this IModuleCatalog catalog, string na /// /// Creates and adds a to the catalog. /// - /// Catalog. + /// The catalog to add the module to. /// Stage on which the module group to be added will be initialized. /// Reference to the location of the module group to be added. /// Collection of included in the group. - /// The same instance with the added module group. + /// The same with the added module group. public static IModuleCatalog AddGroup(this IModuleCatalog catalog, InitializationMode initializationMode, string refValue, params ModuleInfo[] moduleInfos) { if (!(catalog is IModuleGroupsCatalog groupSupport)) diff --git a/src/Wpf/Prism.Wpf/Mvvm/ViewModelLocator.cs b/src/Wpf/Prism.Wpf/Mvvm/ViewModelLocator.cs index dccc3fc74d..e4182b90e5 100644 --- a/src/Wpf/Prism.Wpf/Mvvm/ViewModelLocator.cs +++ b/src/Wpf/Prism.Wpf/Mvvm/ViewModelLocator.cs @@ -17,11 +17,22 @@ public static class ViewModelLocator /// The AutoWireViewModel attached property. /// public static DependencyProperty AutoWireViewModelProperty = DependencyProperty.RegisterAttached("AutoWireViewModel", typeof(bool), typeof(ViewModelLocator), new PropertyMetadata(defaultValue: false, propertyChangedCallback: AutoWireViewModelChanged)); + + /// + /// Gets the value for the attached property. + /// + /// The target element. + /// The attached to the element. public static bool GetAutoWireViewModel(DependencyObject obj) { return (bool)obj.GetValue(AutoWireViewModelProperty); } + /// + /// Sets the attached property. + /// + /// The target element. + /// The value to attach. public static void SetAutoWireViewModel(DependencyObject obj, bool value) { obj.SetValue(AutoWireViewModelProperty, value); @@ -41,10 +52,10 @@ private static void AutoWireViewModelChanged(DependencyObject d, DependencyPrope } /// - /// Sets the DataContext of a View + /// Sets the DataContext of a View. /// - /// The View to set the DataContext on - /// The object to use as the DataContext for the View + /// The View to set the DataContext on. + /// The object to use as the DataContext for the View. static void Bind(object view, object viewModel) { if (view is FrameworkElement element) diff --git a/src/Wpf/Prism.Wpf/Regions/Behaviors/DestructibleRegionBehavior.cs b/src/Wpf/Prism.Wpf/Regions/Behaviors/DestructibleRegionBehavior.cs index fa9f2378f8..61aeee3d2e 100644 --- a/src/Wpf/Prism.Wpf/Regions/Behaviors/DestructibleRegionBehavior.cs +++ b/src/Wpf/Prism.Wpf/Regions/Behaviors/DestructibleRegionBehavior.cs @@ -5,10 +5,23 @@ namespace Prism.Regions.Behaviors { + /// + /// Calls on Views and ViewModels + /// removed from the collection. + /// + /// + /// The View and/or ViewModels must implement for this behavior to work. + /// public class DestructibleRegionBehavior : RegionBehavior { + /// + /// The key of this behavior. + /// public const string BehaviorKey = "IDestructibleRegionBehavior"; + /// + /// Attaches the to the collection. + /// protected override void OnAttach() { Region.Views.CollectionChanged += Views_CollectionChanged; diff --git a/src/Wpf/Prism.Wpf/Regions/IRegionNavigationJournal.cs b/src/Wpf/Prism.Wpf/Regions/IRegionNavigationJournal.cs index 70a321e671..5c30f53ddc 100644 --- a/src/Wpf/Prism.Wpf/Regions/IRegionNavigationJournal.cs +++ b/src/Wpf/Prism.Wpf/Regions/IRegionNavigationJournal.cs @@ -28,7 +28,7 @@ public interface IRegionNavigationJournal /// Gets a value that indicates whether there is at least one entry in the forward navigation history. /// /// - /// true if this instance can go forward; otherwise, false. + /// true if this instance can go forward; otherwise, false. /// bool CanGoForward { get; }