| 123456789101112131415161718192021222324252627 |
- using System.Windows.Controls;
- using System.Windows.Media;
- namespace DataVM;
- public interface IBottomPopManager
- {
- bool RegistBottomPop<TView, TViewModel>(string key) where TView : UserControl, new() where TViewModel : IPopAware, new();
- bool ShowPop(string key, object? state = null);
- }
- public interface IPopAware
- {
- ImageSource? ImageSource { get; set; }
- string? Title { get; set; }
- Action? RequestClose { get; set; }
- void OnPop(object? state);
- bool CanClose();
- void OnClose();
- }
- public class BottomPopContent(UserControl view, IPopAware viewModel)
- {
- public UserControl View { get; } = view;
- public IPopAware ViewModel { get; } = viewModel;
- }
|