// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
// Copyright (C) Leszek Pomianowski and WPF UI Contributors.
// All Rights Reserved.
using Microsoft.Extensions.DependencyInjection;
namespace WPFluent.Gallery;
///
/// Provides extension methods for to support WPF UI navigation and services.
///
public static class ServiceCollectionExtensions
{
///
/// Adds the services necessary for page navigation within a WPF UI NavigationView.
///
/// The to add the services to.
/// The so that additional calls can be chained.
public static IServiceCollection AddNavigationViewPageProvider(this IServiceCollection services)
{
_ = services.AddSingleton<
INavigationViewPageProvider,
DependencyInjectionNavigationViewPageProvider
>();
return services;
}
}