Advanced Live Tiles, Part 3: Lock Screens: Listing 2

The GetBadgeAccess method.

private string GetBadgeAcessMessage(BackgroundAccessStatus status)
        {
            string message = string.Empty;

            switch (status)
            {
                case BackgroundAccessStatus.AllowedMayUseActiveRealTimeConnectivity:
                    message = "May use active real-time connectivity.";
                    break;
                case BackgroundAccessStatus.AllowedWithAlwaysOnRealTimeConnectivity:
                    message = "Always on real-time connectivity.";
                    break;
                case BackgroundAccessStatus.Denied:
                    message = "User denied lock screen badge access.";
                    break;
                case BackgroundAccessStatus.Unspecified:
                default:
                    message = "Unknown lock screen badge access status.";
                    break;
            }

            return message;
        }

About the Author

Eric Vogel is a Senior Software Developer for Red Cedar Solutions Group in Okemos, Michigan. He is the president of the Greater Lansing User Group for .NET. Eric enjoys learning about software architecture and craftsmanship, and is always looking for ways to create more robust and testable applications. Contact him at [email protected].

comments powered by Disqus

Featured

Subscribe on YouTube