Files
DMS/DMS.WPF/Interfaces/INavigationService.cs

27 lines
979 B
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 文件: DMS.WPF/Services/INavigationService.cs
using DMS.WPF.ViewModels.Items;
namespace DMS.WPF.Interfaces;
/// <summary>
/// 定义了应用程序的导航服务接口。
/// </summary>
public interface INavigationService
{
/// <summary>
/// 导航到由唯一键标识的视图,并传递一个参数。
/// </summary>
/// <param name="viewKey">在DI容器中注册的目标视图的唯一键通常是ViewModel的名称。</param>
/// <param name="parameter">要传递给目标ViewModel的参数。</param>
Task NavigateToAsync(MenuItemViewModel menu);
/// <summary>
/// 导航到由唯一键标识的视图,并传递一个参数。
/// </summary>
/// <param name="viewKey">在DI容器中注册的目标视图的唯一键通常是ViewModel的名称。</param>
/// <param name="parameter">要传递给目标ViewModel的参数。</param>
Task NavigateToAsync(string viewKey, object parameter = null);
}