You can't access "NavigationService" from a class or service library, so you will need an alternate method. I see two possibilities:
One option: return a value from your logic library:
public bool SomeMethod()
{
// ...
else if (msg1 == System.Windows.MessageBoxResult.Cancel)
{
return false;
}
return true;
}
That way, you can perform the navigation, or not, in the application:
void SomeMethodInTheApp(RegistroFullBLL registroFullBLL)
{
if (!registroFullBLL.SomeMethod())
{
this.NavigationService.Navigate(new PagRegistro());
}
}
Another option: pass in a delegate from your app to the logic layer. Eg:
public void SomeMethod(Action onCancel)
{
// ...
else if (msg1 == System.Windows.MessageBoxResult.Cancel)
{
onCancel();
}
}
Then from your application:
void SomeMethodInTheApp(RegistroFullBLL registroFullBLL)
{
registroFullBLL.SomeMethod(() => this.NavigationService.Navigate(new PagRegistro()));
}