1

Closed

Bug in PageNavigator

description

I belive there is a bug. You don't pass argument to NavigateTo

/// <summary>
    /// Navigate to a specific page
    /// </summary>
    /// <param name="pageType">Page Type</param>
    /// <param name="argument">Argument to pass (primitive type, may be null)</param>
    public bool NavigateTo(Type pageType, object argument)
    {
        return NavigateTo(pageType, null, null);
    }
Closed May 6, 2013 at 6:18 PM by markjulmar

comments

markjulmar wrote May 6, 2013 at 3:55 PM

Are you looking at the current committed trunk? I'm looking at:

http://mvvmhelpers.codeplex.com/SourceControl/changeset/view/83495#1896331

And the parameter is passed. What code did you pull?

Thanks,mark

Mark Smith

mark@julmar.com | @marksm | 214-774-4749 |www.julmar.com/blog/mark

mity wrote May 6, 2013 at 5:08 PM

Well i am looking at web codeplex's source code viewer. And i followed your link. I see it the way i posted. NavigateTo gets page type parametr and argument. But passes forward only pageType.

markjulmar wrote May 6, 2013 at 6:08 PM

Oh I see - it's the one with the Type, not the string key. Yes, that is a bug - I don't use the type parameter version because it couples the ViewModel to the type of the View, but I added it as a request, clearly didn't test that override though! I'll fix that ASAP.

markjulmar wrote May 6, 2013 at 6:18 PM

Resolved with changeset 83612: Fixed bug in PageNavigator.NavigateTo(Type,object) not passing along argument.
Fixed bug in VisualStateUtilities.ShouldContinueTreeWalk - missing test.

markjulmar wrote May 6, 2013 at 8:56 PM

Associated with changeset 83613: - Added BindingTrigger to pass evaluated object onto Action - this is useful for VSM changes.
  • Change GoToStateAction to use passed parameter as StateName if no state name is supplied.