protected virtual void OnPagePopped(Page i_PoppedPage) { if (OnPopped != null) { ViewNavigationArgs viewNavigationArgs = new ViewNavigationArgs(); viewNavigationArgs.PoppedView = i_PoppedPage as IView; viewNavigationArgs.CurrentView = m_Page.CurrentPage as IView; viewNavigationArgs.Parameter = r_ParameterQueue.Count > 0 ? r_ParameterQueue.Dequeue() : null; OnPopped.Invoke(this, viewNavigationArgs); } }
/// <summary> /// Allow fluent addition of parameters /// </summary> /// <typeparam name="T">The type of the parameter</typeparam> /// <param name="args">The view navigation arguments</param> /// <param name="name">The name of the parameter</param> /// <param name="value">The value of the parameter</param> /// <returns>The instance of <see cref="ViewNavigationArgs"/></returns> public static ViewNavigationArgs AddNamedParameter <T>(this ViewNavigationArgs args, string name, T value) { args.ViewParameters.Add(name, value); return(args); }
/// <summary> /// Add a width for a window in OOB mode /// </summary> /// <param name="args">The original <see cref="ViewNavigationArgs"/></param> /// <param name="height">The height for the window</param> /// <returns>The args with the height parameter appended</returns> public static ViewNavigationArgs WindowHeight(this ViewNavigationArgs args, double height) { args.AddNamedParameter(Constants.WINDOW_HEIGHT, height); return(args); }
/// <summary> /// Add a width for a window in OOB mode /// </summary> /// <param name="args">The original <see cref="ViewNavigationArgs"/></param> /// <param name="width">The width for the window</param> /// <returns>The args with the width parameter appended</returns> public static ViewNavigationArgs WindowWidth(this ViewNavigationArgs args, double width) { args.AddNamedParameter(Constants.WINDOW_WIDTH, width); return(args); }
/// <summary> /// Add a title to the parameter /// </summary> /// <param name="args">The original <see cref="ViewNavigationArgs"/></param> /// <param name="title">The title</param> /// <returns>The args with the parameter for title appended</returns> public static ViewNavigationArgs WithTitle(this ViewNavigationArgs args, string title) { args.AddNamedParameter(Constants.WINDOW_TITLE, title); return(args); }
/// <summary> /// Publish as an out of browser window /// </summary> /// <param name="args">The original <see cref="ViewNavigationArgs"/></param> /// <returns>The args with the parameters appended</returns> public static ViewNavigationArgs AsOutOfBrowserWindow(this ViewNavigationArgs args) { args.AddNamedParameter(Constants.AS_WINDOW, true); return(args); }