Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update RegionNavigationRegistrationExtensions.cs #3145

Merged
merged 1 commit into from
May 22, 2024

Conversation

jpislas
Copy link
Contributor

@jpislas jpislas commented May 20, 2024

Allow for registering a view for navigation using type. This method already exists but is currently private. This is existing function so no tests created.

## Description of Change

Make existing function public.

Changed:

  • private static IContainerRegistry RegisterForRegionNavigation => public static IContainerRegistry RegisterForRegionNavigation

PR Checklist

  • Has tests (if omitted, state reason in description)
  • Rebased on top of master at time of PR
  • Changes adhere to coding standard

Allow for registering a view for navigation using type. This method already exists but is currently private.
@dansiegel
Copy link
Member

@jpislas can you please give us some context on why you feel this is needed as part of the public API?

@jpislas
Copy link
Contributor Author

jpislas commented May 22, 2024

@jpislas can you please give us some context on why you feel this is needed as part of the public API?

@dansiegel I register my views using attributes/reflection and don't have access to strongly type them so I end up having to work around it. Its also the way it is set up for standard non region based navigation registration, so it would be consistent with existing functionality. For example:

            if (attribute != null)
            {
                if (attribute.UseRegionNavigation)
                    containerRegistry.RegisterForRegionNavigation(t, attribute.ViewModelType, t.Name);
                else
                    containerRegistry.RegisterForNavigation(t, attribute.ViewModelType, t.Name);
            }

@dansiegel dansiegel merged commit 17c6d31 into PrismLibrary:master May 22, 2024
2 checks passed
@jpislas jpislas deleted the patch-1 branch May 22, 2024 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants