private static Serializer.Data LoadNavigationData(string assemblyName)
        {
            Serializer.Data data = null;
            if (InteractionContext.NavigationData.TryGetValue(assemblyName, out data))
            {
                return(data);
            }

            Application app  = Application.Current;
            string      path = string.Format(CultureInfo.InvariantCulture, "/{0};component/Sketch.Flow", assemblyName);

            try
            {
                var info = Application.GetResourceStream(new Uri(path, UriKind.Relative));
                if (info != null)
                {
                    data = Serializer.Deserialize(info.Stream);
                    InteractionContext.NavigationData[assemblyName] = data;
                }
            }
            catch (IOException) { }
            catch (InvalidOperationException) { }

            return(data ?? new Serializer.Data());
        }
        private static string GetScreenClassName(string screenName)
        {
            Serializer.Data data = null;
            InteractionContext.NavigationData.TryGetValue(InteractionContext.LibraryName, out data);
            if (data == null || data.Screens == null)
            {
                return(null);
            }

            if (!data.Screens.Any(screen => screen.ClassName == screenName))
            {
                screenName = data.Screens
                             .Where(screen => screen.DisplayName == screenName)
                             .Select(screen => screen.ClassName)
                             .FirstOrDefault();
            }

            return(screenName);
        }