-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[XF] EventToCommandBehavior.OnEventRaised NullReferenceException #1549
Comments
Thank you for reporting this. unfortunately We could use |
We went with the |
Sounds good and I'll give it a whirl later today when I get chance. Didn't expect you to put a fix in so quickly haha. While
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description
Setting
EventArgsParameterPath
to a property that is declared in a derived class of the event arguments causes aNullReferenceException
to be thrown.e.g.
WebView.Navigating
event argumentsWebNavigatingEventArgs
derives fromWebNavigationEventArgs
. TheUrl
property is declared withinWebNavigatingEventArgs
so when you setEventArgsParameterPath
toUrl
it will cause aNullReferenceException
to be thrown.Steps to Reproduce
Best reproduced on iOS as the
Navigating
event doesn't fire on an initial page load for Android.Prism Blank App
MainPage
with the following:MainPageViewModel
with the following:Reproduction Link
EventToCommandBehavior.zip
Expected Behavior
Bound command is executed with the Url parameter
Actual Behavior
NullReferenceException
is thrownBasic Information
Suggested Fix
Change:
Prism/Source/Xamarin/Prism.Forms/Behaviors/EventToCommandBehavior.cs
Line 186 in 9ee268e
To:
The text was updated successfully, but these errors were encountered: