This repository was archived by the owner on Jun 21, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ public FrameworkElement CreateView<TViewModel>() where TViewModel : IViewModel
4343 /// <inheritdoc/>
4444 public FrameworkElement CreateView ( Type viewModel )
4545 {
46- var f = Views . FirstOrDefault ( x => x . Metadata . ViewModelType . Contains ( viewModel ) ) ;
46+ var f = Views . FirstOrDefault ( x => x . Metadata . ViewModelType . Contains ( viewModel . FullName ) ) ;
4747 return f ? . CreateExport ( ) . Value ;
4848 }
4949 }
Original file line number Diff line number Diff line change @@ -37,10 +37,10 @@ public sealed class ExportViewForAttribute : ExportAttribute
3737 public ExportViewForAttribute ( Type viewModelType )
3838 : base ( typeof ( FrameworkElement ) )
3939 {
40- ViewModelType = viewModelType ;
40+ ViewModelType = viewModelType . FullName ;
4141 }
4242
43- public Type ViewModelType { get ; }
43+ public string ViewModelType { get ; }
4444 }
4545
4646 /// <summary>
@@ -69,7 +69,7 @@ public ExportMenuAttribute() : base(typeof(IMenuHandler))
6969 public interface IViewModelMetadata
7070 {
7171 [ SuppressMessage ( "Microsoft.Performance" , "CA1819:PropertiesShouldNotReturnArrays" ) ]
72- Type [ ] ViewModelType { get ; }
72+ string [ ] ViewModelType { get ; }
7373 }
7474
7575 /// <summary>
You can’t perform that action at this time.
0 commit comments