/// <summary> /// Get & remove value from context /// </summary> /// <typeparam name="T"></typeparam> /// <param name="key"></param> /// <returns></returns> public static T PopNavigationValue <T>(NavigationDataType key) { if (!NavigationContext.ContainsKey(key)) { return(default(T)); } var value = (T)NavigationContext[key]; NavigationContext.Remove(key); return(value); }
/// <summary> /// Add value in the navigation context /// </summary> /// <param name="key"></param> /// <param name="value"></param> public static void AddNavigationValue(NavigationDataType key, object value) { NavigationContext.Add(key, value); }