Ejemplo n.º 1
0
    public static IDictionary <string, object> Get(string pageName)
    {
        IDictionary <string, object> result = new Dictionary <string, object>();

        if (NavigationParameters2.ContainsKey(pageName))
        {
            result = NavigationParameters2[pageName];
            NavigationParameters2.Remove(pageName);
        }

        return(result);
    }
Ejemplo n.º 2
0
    public static void Add(string pageName, string key, object value)
    {
        if (!NavigationParameters2.ContainsKey(pageName))
        {
            NavigationParameters2.Add(pageName, new Dictionary <string, object>
            {
                { key, value }
            });
        }
        else
        {
            var entry = NavigationParameters2[pageName];

            if (!entry.ContainsKey(key))
            {
                entry.Add(key, value);
            }
            else
            {
                entry[key] = value;
            }
        }
    }