You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling FreshMvvm.FreshPageModelResolver.ResolvePageModel(), the page cannot be resolved (the view/page model resolves) unless both the page and the page/view model are in the root namespace. Is this desired functionality?
ex.
These resolve:
namespace CSI
{
public partial class WelcomePage : ContentPage
{
public WelcomePage()
{
InitializeComponent();
}
}
}
namespace CSI
{
public class WelcomeViewModel : FreshBasePageModel
{
public WelcomeViewModel()
{
}
}
}
The Page does NOT resolve:
namespace CSI.ViewModel
{
public partial class WelcomePage : ContentPage
{
public WelcomePage()
{
InitializeComponent();
}
}
}
namespace CSI (or changing this namespace)
{
public class WelcomeViewModel : FreshBasePageModel
{
public WelcomeViewModel()
{
}
}
}
The text was updated successfully, but these errors were encountered:
@WiteCastle @t4lm1d FYI, the issue you are encountering is because of the simple approach to resolving page types from their page models.
Have a look at here and you will see if you place your page models / view models in a name space with the word "ViewModel" or "PageModel" it will be replace with the word "Page" and therefore the type resolution will fail.
Seems like picking any other namespace naming convention should work. Best of luck.
@WiteCastle Thanks! I haven't had time to look into this so I appreciate your response. Seeing that link you sent, makes sense. I will close this issue.
When calling FreshMvvm.FreshPageModelResolver.ResolvePageModel(), the page cannot be resolved (the view/page model resolves) unless both the page and the page/view model are in the root namespace. Is this desired functionality?
ex.
These resolve:
namespace CSI
{
public partial class WelcomePage : ContentPage
{
public WelcomePage()
{
InitializeComponent();
}
}
}
namespace CSI
{
public class WelcomeViewModel : FreshBasePageModel
{
public WelcomeViewModel()
{
}
The Page does NOT resolve:
namespace CSI.ViewModel
{
public partial class WelcomePage : ContentPage
{
public WelcomePage()
{
InitializeComponent();
}
}
}
namespace CSI (or changing this namespace)
{
public class WelcomeViewModel : FreshBasePageModel
{
public WelcomeViewModel()
{
}
The text was updated successfully, but these errors were encountered: