User Stories

(Update 3) Fixed: Windows Phone Store is charging again for already paid apps

(Update 3) Fixed: Windows Phone Store is charging again for already paid apps

image

Yesterday I had a very strange problem on my Windows Phone. I uninstalled an app, and wanted to reinstall it as I had problems after the last update with it. The Windows Phone Store did not recognize that I already paid that app.

So I contacted the Windows Phone support team via twitter. As they did not have a solution for me, the referred me to the chat team (click here to get there).

While the chat itself could not resolve my issue, they offered a way to escalate the issue. They ask me to create a list with all apps that are missing from the purchase history on windowsphone.com.

That is the bad part of it. I downloaded more than 1000 apps for testing etc., and my list will be very long because of this.

I told them that I will blog about it, they appreciated it and are begging for the following steps:

– check the purchase history on https://www.windowsphone.com/en-us/my/purchase-history

– create a list of all missing apps (sigh!), include also the price of the apps and please include also apps that you have installed but that are missing from your purchase history!

– contact the chat team and tell them about your problem (it’s 24 hours)

They told me it is a known issue, and that this is the only way to get around it. I am sure if enough of us are sending the list, Microsoft will investigate what is going on over there.

A huge help will be your buying confirmation mails, which is sent to you after every purchase.

I will update this post as soon as I get new information, but for now we all can only create our list and send it to them. I am really sorry for this bad news.

Update: of course I do not want to force you to that steps above. I wanted to describe what is going on there. Stay tuned, as I got confirmation that this is escalated also from another part within Microsoft. So hopefully there will be a solution soon.

Update 2: Microsoft is aware of the issue with our purchased app history.  I had a short discussion with the twitter support team yesterday about how serious Microsoft is about the above written steps.  There is a topic at Microsoft answers forum now, where you can subscribe and click that you are also having this problem. The more people click on the “I had this too” button, the more attention it will get.

Update 3: It seems Microsoft just fixed the issue. Mark tipped me that it should work again and I can confirm. According to wpcentral, the problem was that upcoming updates exploited a bug in the billing system. Microsoft decided it would be better to temporarily switch the history that causes the bug off than let our devices crash. The sad thing about it is the bad communication to us users in this case. Anyway, problem is fixed now.

Posted by msicc in Microsoft, Windows Phone, 2 comments
How to set up your Klout topics to receive better +K

How to set up your Klout topics to receive better +K

This post will be a bit off the usual  topics, but it is an important one in my eyes. Klout, a social measuring service, is used by  lot of people that follow in my community.

Based on the topics you cover in your social world, you can receive so called “K+”, which can increase your Klout score.

Sadly a lot of people are using Klout to measure their influence, but only a small amount adjusts their topics on which they are influent. I just wanted to show you all how easy you can adjust your topics.

When you are on your Klout profile, scroll down until you see the “Your Topics” on the left part of the page.

 

You will have to move the mouse into this field to see “see more”. Click on that to open your topics list:

  

Check that list for topics you want to be influent of. If you discover a topic that you want to remove from that list, you have to move your mouse over the icon of that topic. With a click on the ‘X’ you will be prompted for confirmation.

 

You may have to delete a lot of topics until you will have removed all unwanted items in that list. After you finished, you can add new topics to that list via “Add a topic”. If you do not see this on your list, you will have to delete more items from the current list.

 

So that’s all about the simple way to optimize your Klout topics. I hope this will help a lot of you to improve your Klout score.

Posted by msicc in User Stories, 2 comments
Meet Steve at Berlin

Meet Steve at Berlin

 

As some of you know, Microsoft CEO Steve Ballmer himself visited Berlin a few days ago. First I want to apologize for the delay this post has, but sometimes there are things that can push things back. I am still amazed about the fact that I was able to attend this event.

The evening started with a short introduction of the recent Milestones Microsoft achieved, presented by Microsoft Germany CEO Peter Jaeger.  The second part was about to show the integration of cloud services, presented my MS Germany Developer Evangelist Gunter Logemann. He reminds us developers to use the advantages of this integrated services.

At some point Steve Ballmer entered the room, and we all got a bit more nervous (yes, I was only two meters away from him!)

WP_001196

 

He was introduced with his own Windows Phone screen ad video, and started with a little joke that he was wondering who was talking while he enters the stage. Great start for his exclusive keynote.

 

WP_001198

 

He then switched to do what he is very good at: talking about Microsoft products and the possibilities they offer. He started with some numbers and feedback about Windows 8. In only 14 days, there were more than 4 million upgrades to Windows 8, and the press and blogosphere was positive about Windows 8. He was absolutely charmed about J. Topolsky`s comment: “Who have thought that in 2012 Microsoft would be the company with the boldest phone and software design?”. And of course we all were charmed about that, too.

 

WP_001206

 

Then he introduced the ecosystem “Windows” to us. No matter which device, Windows will be the core experience. And this experience is alive with activity – the user’s (our) activity. No matter if you are on your PC, tablet or on your phone or Xbox.

 

WP_001213

 

He continues that Microsoft is “All In” with the new Metro design language (well, he called it Windows 8 style, but we all know he wanted to say Metro). All main products where updated to the new design language to make a unique UX across all devices.

 

WP_001216

 

Steve is still amazed about how fast and fluid content is synchronized across devices via the Microsoft cloud – even though Microsoft created this whole experience. And every developer is invited to use it to create amazing apps!

 

WP_001218

 

Nearly at the end of his speech some developers where honored for Windows 8. Their apps  were created in the Darkside Bakery project and are already available on the Windows Store.

Sadly I did not have to opportunity to talk to himself or at least shake his hand. But it was amazing enough to see and hear him live and in person. Thank you, Microsoft, for this very unique experience I do not want to miss! Steve’s speech was really motivating, and I will go  “All In” with Microsoft. How about you?

Posted by msicc in Dev Stories, Microsoft, win8dev, Windows, Windows Phone, wpdev, 4 comments
Windows Phone 8 – the next generation

Windows Phone 8 – the next generation

Today I will write about my impressions on Windows Phone 8, the next generation of Windows Phone. First thing I can tell you: I am really impressed what Microsoft has done here.

This Post will be about my favorite features on Windows Phone 8, if anyone prefers other features, feel free to leave a comment below.

Individual start screen

Of course, the first feature I absolutely love is the new start screen. Every user can now individually change the tile sizes from small to middle to big. This way every device will have another look:

 

Windows Phone 8 start screen

None of the hopefully exploding numbers will look like any other. Best thing: this is one of the features that will come also to existing Windows Phones. I can´t wait to make my start screen look even more individual.

The new lock screen

Screenshot (35)

The Windows Phone 8 lock screen can be taken over by Windows Phone apps. There are several ways they can do it.

  • show images as wallpaper
  • show information from within the app as lock screen (partly/full takeover)
  • show number of new notifications

The photo above shows how the completely rewritten Facebook app for Windows Phone takes over the look screen by showing randomly changed Facebook photos.

I can’t wait to see what my fellow dev colleagues are doing to give us an awesome user experience. For my apps, I am currently investigating what possibilities I have to give you some awesomeness. With my app MSicc´s Blog it will be for sure something related to new posts, so you won’t miss any news from it. For my other apps I am currently searching a helpful way.

 

Benefits for the little one´s and parents: Kids corner

Screenshot (47)

Joe Belfiore demonstrated kids corner in an really awesome way. He let show his kids this awesome feature. Our kids are often asking us to let them play with our phones. We are of course afraid they could do something that they shouldn’t like sending messages or other things like this. Microsoft has done a fantastic job in adding a separated section for our kids, where we can add apps and games that are safe to use for our little stars. Can´t wait to introduce this to my 6 year old daughter (my son wants his own Windows Phone, so let’s see if he was brave enough in Santa´s eyes).

Xbox Music – finally also in Germany with pass

Screenshot (58)

As I wrote earlier, Microsoft finally unleashed Xbox Music for Windows Phone, Windows 8 and Xbox. Here are some additional features that are available in Windows Phone 8:

  • seamless syncing of Playlists and Albums
  • Xbox Music streaming via the cloud
  • apps can interact with Xbox Music
  • streaming to Xbox via SmartGlass

I am really happy that Microsoft finally added more countries to the Music Pass. If you haven´t activated your pass, you really should do it right now.

 

There are more awesome features:

  • SkyDrive syncing of photos, office documents
  • DataSmart
  • Voice Commanding of the phone and apps
  • Wallet
  • restructured Windows Phone Store
  • in app purchases
  • Rooms in people hub
  • many ways devs can improve their apps (I will do separate posts about them)
  • and more

I will cover them from my point of view as soon as I get my hands on a Windows Phone 8 device. Which leads me to the launch line up of Windows Phone devices:

Screenshot (61)

From left to the right we have the Lumia 920, Lumia 820 by Nokia, the Ativ S by Samsung and the 8S as well as the 8X by HTC.

What are your favorite features? Which device are you looking forward to? Leave a comment below.

Posted by msicc in Microsoft, Windows Phone, 6 comments
Dev Story Series (Part 1 of many): Creating a data class for both Windows 8 and Windows Phone app

Dev Story Series (Part 1 of many): Creating a data class for both Windows 8 and Windows Phone app

As I promised earlier on my application for the Intel App Innovation Contest on codeproject.com, I will do a series of blog posts for my application MSicc´s Blog for Windows 8 and Windows Phone.

This is the first article in my new Dev Story Series, where I describe the development process of the app. I am starting with the very first steps that you have to do if you plan such an application. To make the application useful, we first have to decide how we want to get the data from our blog/website into our application.

One hint that will make some of you crying out loud: At the moment I am not using the MVVM pattern. I am aware of the fact that most devs for Silverlight/C# swear on it, but I still decided to go without it – as well on Windows Phone as on Windows 8. I will continue to learn it in one of my future project, but for the moment I just want to get things done – also if that means that I have to create some – well, let us call it “compromises”.

Which way to choose?

If you consider to create a “blog reader”, you have to think about how you want to get the data from your blog into your app. There are different ways:

  • via a RSS/Atom feed (that was in the old version of my Windows Phone app for msicc.net)
  • via XMLRPC (if your blog supports that)
  • via JSON

I decided to go with JSON for the new version. There were several reasons to do so:

  • there is an app err… an plugin for that on WordPress
  • JSON is fast
  • JSON is set to be the new standard for data consumption
  • With JSON.NET you can deserialize your data with only one line(!) of code

How do we get the data in our app?

Of course, we will download it. But if you only download your JSON data, the only thing you will get is a very weird looking string that looks like this:

json_string_unserialized

That´s pretty ugly, right? Of course we could work us through all arrays and objects there. That would take hours and hours until we would have covered all data we need for our apps. Luckily, there are two tools that make the whole thing a lot easier.

Two handy tools to make a dev´s life easier

The first tool I want to show you is “Beautify JSON”. It is a web based tool that makes strings like the one above readable for a human. Find it here.

Just paste the string of your JSON API in there, and you will get a readable version of your JSON string:

beautify_json

If you want to use only some of the data that your API provides, you can now easily search the string for the objects and arrays that you need.

If you quickly want to create a data class for all data that is provided, you can do this by using json2charp.  It provides a ready-to-use code that can easily be copied and pasted into your class file in Visual Studio:

json2charp

Now let´s have a look to the class itself:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace WordPressDataClass
{
 public class Posts
    {
        [DataMember]
        public string status { get; set; }
        [DataMember]
        public int count { get; set; }
        [DataMember]
        public int count_total { get; set; }
        [DataMember]
        public int pages { get; set; }
        [DataMember]
        public List<Post> posts { get; set; }
    }
}

As you can see, I created a DataContract and DataMember based class by using System.Runtime.Serialization. If you want to know more about DataContracts and DataMembers I recommend you to read MSDN: using Data Contracts.

I am not posting the whole class, only the key DataContract Posts, which will get us our List of posts. You can download the whole class at the end of the post. It will be very helpful if you want to create an app for your WordPress based blog.

I use the class in both my Windows 8 and my Windows Phone app without any differences. As you can see, If you are familiar with Windows Phone Development, there is only a small step to Windows 8 development.

I hope this article is helpful for some of you. In my next post I will show you how easily you can use the provided JSON Data in your app/s.

source code: JsonDataClass

Posted by msicc in Dev Stories, win8dev, Windows, Windows Phone, wpdev, 4 comments
Zune/Xbox Music Pass available in Germany (includes a short how-to)

Zune/Xbox Music Pass available in Germany (includes a short how-to)

Yesterday some users reported to wparea.de that the Zune/Xbox Music Pass is available. However, yesterday I was able to activate it, but no usage was possible.

This changed this morning.

Here are is a short view on how to use the Zune/ Xbox Music Pass:

On your Windows Phone:

Just go to the marketplace, search the album you want. You will see the word “Herunterladen” ( German for download) on the album, if it is available to use with the subscription:

 

Screen Capture (41)

Once you clicked that, you only have to wait until the download of the album has finished. If you do not want to download, you can stream the music by clicking on the small “play”-symbol in front of a song, which will start streaming.

On your PC

You will need to use the Zune software. Crazy, isn´t it – it works only with a program that is set to die soon.

Here it is pretty much the same like on your phone, just click on download to listen to an album offline.

 

Screenshot (29)

If you don´t want to download, just double-click on a song in the album you want to hear, that will stream the whole album.

I wasn’t able to use it on the Windows 8 Music app as well as on my Xbox. I will update this article as soon as I got this working.

If you want to activate a 30 day trial of this awesome features, here is the site to activate it.

Of course, it is still an unofficial thing, as Microsoft stated it will become available at Oct, 26th. It works for now, so enjoy everybody of my fellow readers in Germany!

Posted by msicc in Microsoft, Windows, Windows Phone, Xbox, 0 comments
(Rumor) Microsoft Surface coming to Europe?

(Rumor) Microsoft Surface coming to Europe?

surface_05

Today Hellshock (follow him!),  one of my Italian tweeps made an awesome discovery. The Italian Microsoft site has a link to Surface within the “Products” section.

Of course I checked that for Germany as well, and in fact it is there, too:

Screenshot (14)

Well, I know that this means nothing at the moment, but it is a sign that Microsoft will bring the Surface all over the World. Maybe Microsoft this time learned from their Zune HD, which was announced for the rest of the world, but never made it to Europe.

What do you think? Are we reading to much into it? Will you be excited?

Just leave a comment below.

source

Posted by msicc in Microsoft, Windows, 0 comments
Editorial – the relationship between developers and users

Editorial – the relationship between developers and users

I did not plan this post, but as I received an email yesterday from another developer, this changed. This post will be an Editorial about the relationship between developers and users.

Users and developers do have a problem. Users have expectations for our apps. We developers have to fulfill these expectations. Here is an image I found on the web, that describes the situation quite well:

Of course, this is a funny Picture. But in the last few weeks sadly this image turned out to be kind of  true. I talked also to other developers, and they made similar experiences. I will try to explain why feedback is important to us developers.

It all starts with an idea. The idea can come from a friend, a family member or from a situation your life. For my very first app the situation was simply the app I searched was not out there in the marketplace and it is no pleasure to use the mobile web in some situation (e.g. while fishing). For another app a discussion on my primary work was the reason.

If you are an app developer, you now sit down and create a concept. You have to think about a lot of things:

  • which features do I want in my application?
  • do I already know all to get this features into my app?
  • where can I learn about features that I want but do not know how to code them?
  • How does the UI have to look?
  • How much time will it cost to create a first running application?
  • what are the limitations of the OS I am coding for?
  • how can I promote my apps?
  • and certainly a few other things

Until now, we do not have written one line of code, but already spent a few hours if not days only in planning phase. At some point, of course we start coding. The coding and designing process is followed by ups and downs, where you have to reconsider features, sometimes even have to rethink your whole attempt on how to create the app.

I have a very good example for that. Initially I tried to use animated gifs in my app “fishing knots +” . It turned out that Windows Phone does not support this image format natively. So I searched a way to achieve my goal and let Windows Phone learn it within my app. There are some solutions out there, but I was not satisfied with the result. So I started to search for alternatives and found one that suites it very well: a storyboard for each animation. But then I had another problem: For a storyboard animation, you need single images, not a finished gif animation. Luckily one of my co-workers could help me out and created the images for me, so I was able to use it. But it took also some time for him to create the images (12 knots with at least 10 images). I created the basic images, and he did his magic. The result was great.

Now we have a very basic version of our app that runs, and can also be shown to some people. And of course, friends, coworkers and family are your first “customers” that give you some feedback. You should be grateful for the feedback they provide, as it often offers you sights on which you do not think while developing the app. Also if that means you have to rewrite a bunch of your code. They are no developers (in most cases). They are just users. Let them play around with your app (best on a real device!), and do write down every single point they tell you. Feedback is good, and helps you to evolve.

Now that we have done this, our app at some point reaches the state of being submitted to the Marketplace/Store. You should never start with a final version number like 1.0 for that. 1.0 suggests a user that it is a finished product with nearly no error. And they errors will come. I did not see a single app that was without issues on the first release, neither on the following updates. This counts for my apps as well as for apps of other developers. But that is not a bad thing. Once you have published your app, you have the possibility to obtain more feedback. This time from real end users.

To achieve this, you should offer a way to give feedback within your application. Here is my attempt that I have in every of my apps:

 

 

As you can see, I integrated a few ways to obtain feedback. I created a twitter handle, where users can give feedback and follow for actual announcements for my apps. Nowadays a Facebook page is also an advantage, and then users have the ability to send me an email to provide more detailed feedback. And one thing you never should miss: a direct link from your app to the review section of your app in Marketplace.

So from our part, we did all to get some feedback. Now to you, user of our app! We want you to give us some feedback! What we want is feedback that helps us to understand what you expect.

Sadly a lot of users are rating an app with less stars, providing no feedback or only harsh words for the app. A rating for an app was delivered with less than 5 stars because the app is not free. Another one gave me 1 start and as comment: “great”. That is not feedback that can be used to improve the app.

Another example is glƏƏk! for Windows 8. It is an really fast and fantastic twitter app. I use also their Windows Phone version, and I am absolutely happy with it.

The first versions of the Windows 8 app had some problems and was crashing a lot. Users, of course, wrote that into their reviews. But how many of them did give them feedback to improve the app? As I am in contact with the developers, I know that they did not get a lot of feedback to iron out all those issues. Feedback is important to us developers. We need to know in which cases you, the users, have the issues. We have to reproduce the error, but that is nearly impossible without your feedback.

I understand that you give a bad rating to an app if it crashes a lot or if you are constantly facing other problems. And we developers try to iron out every single point you tell us. If you see that the experience has improved, you also should honor the work we do for you and update your rating and review. glƏƏk! had some issues like all other twitter clients on Windows 8, too. In the meantime, glƏƏk! was updated nearly every day to iron out other issues, and finally we have a non crashing version.  But no one updated their reviews and ratings. Sure, some may have uninstalled the app, others are having it  still but do not updated their rating/review. This is frustrating for developers who do not get a lot of feedback via email or other channels but only via the ratings.

Please, do not take this as advice to not rate our apps. We want your ratings. But be fair. If something is wrong with one of our apps, please tell us! But I beg you to understand that we only can work with quality feedback, so please use twitter/Facebook/email, whatever we offer you. Give us as much information as you can, answer to our questions if we have them to you.  And please update your ratings after we have ironed out your issues.

Please not also that we are no aliens. We are humans like you after all. And we are  also users.

Posted by msicc in Dev Stories, win8dev, Windows, Windows Phone, wpdev, 0 comments
Post #200 or what exiting times we have with Microsoft

Post #200 or what exiting times we have with Microsoft

microsoft_logoI struggled with myself very long on what topic I dedicate this post with the anniversary number 200 and ended up with this article.

We all had already a very exiting year with Microsoft. Microsoft is fully in his “reimagine” phase, and the winners of this are we – as users, and as developers.

Windows 8

The year was starting for me with a key milestone: Windows 8 CP. A more fluid and fast alternative to the DP Microsoft released last year. And we finally had a good amount of apps (for a beta build). I felt really in Love with Windows 8 after using it only a few hours. Windows 8 is totally different. The Metro start screen will change the way how users will interact with their PC – also if it is non touchable.

I am currently running the final version of Windows  (RTM), and I love it to use more and more apps instead of visiting websites. It is way more fun to use a twitter app than to use their website, for example.

It is a change in the daily use of your PC, but most of the users that I personally know are exited about how easy it is to use a PC with apps. Sure, there are some people who will not be satisfied. That is not a bad thing. We all like different kind of things. But I am convinced that the majority of people will accept the Metro screen as part of their PC. Period.

For Developers it is amazing: no matter what language you are using right now, almost everyone can do Windows 8 apps. No matter if you are a Web Designer, used to Java, C# or C++, your app can be there on Windows 8! And you can even use more than one programming languages in one app.

In March this year I visited the CeBit, a trade fair that is for technology news here in Germany. I was amazed about the things I saw from Microsoft, but Germany is not a big target for the mobile/IT-industry- at least not shortly after the MWC. You can read my report about the CeBit here.

Windows Phone

Windows Phone is also an important point on our list. Microsoft´s mobile OS may not be blown up as iOS or Android – but we are satisfied with what we have! The OS is fast, does Average Joe´s daily doings way faster than the other two OS – without Multicore-CPUs!!! Microsoft demonstrated this with their “Smoked by Windows Phone” campaign, which was happening in several countries around the globe.

The best thing is: The OS will be getting even better! The existing devices will get an update with new functions, that will further enhance the user experience. And there will be the next generation: Windows Phone 8!  Windows Phone 8 will get a whole new core compared to 7, that will bring a lot more features, and for all that spec-driven users out there also multi-core support. Soon we will know more about it (I guess in September).

Xbox 360 and Xbox Live/Zune

Microsoft is also evolving the Xbox/Zune services as well as the Xbox OS itself. If you were one of the lucky one´s like me to enter the Fall 2012 beta update program, you know that it is getting better and better.  I am not allowed to go to deep into detail, but a few things have been announced, like IE for Xbox.

Xbox Live and Zune services will be merged together to further enhance our experience. Hopefully Microsoft will be providing more features to all countries, not only US. Best example is Zune Pass, which is still not available here in Germany. I don´t know what issues Microsoft has with the Germany system, but others like Deezer and Spotify were also able to solve those problems. Let us hope all the best for this.

And then there will be SmartGlass. Your Xbox companion – regardless which device you use. SmartGlass will be used to extend the experience you with your Xbox. Additional info for Movies, extensions for Games, and many many more.

Office 2013

I am also exited about the free-to-test-for-everybody Office 2013 Preview. Microsoft changed the programs into streamed applications. And they are performing very well (even with my slow 2 MBit/s connection). On top Microsoft released One Note MX, a Metro app for Windows 8 for those who use a WinRT tablet only. Get it today via the official Office 2013 website (for up to 5 PCs!). Skype integration is coming later this year via an “Office app”.  There are also further apps in the Office Beta Store.

Microsoft Account and connected Websites

Microsoft changed the formerly known “Live-ID” into “Microsoft Account”. You still have all service like before, with a new name. But there is more. Hotmail will be replaced with outlook.com (in Metro Style). outlook.com has also a “People” app, “Calendar” and of course your “Mail”. On top we now have a Metro “Messenger”. SkyDrive is the last one in this round. Also SkyDrive has been Metro overhauled an got new functions, like a url-shortening service, using skdrv.ms.

MSiccDev goes BizSpark

As some of you know, I am also developing for Windows Phone and will start with Windows 8 soon. I started to learn creating apps because there was no app for fishermen, and I needed a fishing knots app in the marketplace. I am currently planning on a big service for fishermen that targets Windows, Windows Phone and the Web. To get things done with a little help from Microsoft, I applied for Microsoft´s BizSpark program – an got approved last week! Stay tuned, soon I will reveal more information about the project. But it is great that Microsoft support startups. A special thanks goes to @AWSOMEDEVSIGNER (follow him!).

Final thoughts

I don’t know how you feel, but that was a pretty awesome year until now. Windows 8 is around the corner, and will bring new device factors like Microsoft´s surface. All big vendors announced at least one Tablet/PC-convertible. Windows Phone 8 will be the booster rocket for the phone OS version, the codename “Apollo” fits really nice in here.  Microsoft´s vision of “three screens, once experience” is getting closer and closer. And the best thing: we all can participate right now!

Posted by msicc in Bing, Microsoft, Windows, Windows Phone, Xbox, 0 comments
WPDEV: smooth SplashScreen transition for your Windows Phone app

WPDEV: smooth SplashScreen transition for your Windows Phone app

Today I finished an update for one of my apps with adding a CustomControl as SplashScreen. I had to do it this way because my app is localized in English, German and Italian. Most annoying at this part was that there is no smooth transition between the SplashScreen and the MainPage. By the way, there is also no smooth transition with the “normal” SplashScreenImage.jpg that is included in all app templates of Visual Studio 2010.

I often use the transitions that are built into the Silverlight for Windows Phone Toolkit (download here or use the Nuget-installer of Visual Studio). These transitions can be modified and used for custom transitions. I will show you how to create a fade out effect for your custom SplashScreen control.

First we have to create a project. I called the sample SplashScreenTransition.

The first thing we have to do is to create two classes: CustomTransition.cs and SplashScreenTransition.cs.

Let´s have a look on the first class, CustomTransition.cs:

namespace SplashScreenTransition
{
    public class CustomTransition : ITransition

    {
        Storyboard storyboard;

        public CustomTransition(Storyboard sb)
        {
            storyboard = sb;
        }

        // these are used by the transition

        public void Begin()
        {
            storyboard.Begin();
        }

        public event EventHandler Completed
        {
            add
            {
                storyboard.Completed += value;
            }
            remove
            {
                storyboard.Completed -= value;
            }
        }

        // not used for SplashScreen, but needed to create the whole animation
        // if you don´t add these, you will not be able to build your project

        public void Stop()
        {
            storyboard.Stop();
        }

        public void Pause()
        {
            storyboard.Pause();
        }

        public void Resume()
        {
            storyboard.Resume();
        }

        public void SkipToFill()
        {
            storyboard.SkipToFill();
        }

        public void Seek(TimeSpan offset)
        {
            storyboard.SeekAlignedToLastTick(offset);
        }

        public void SeekAlignedToLastTick(TimeSpan offset)
        {
            storyboard.SeekAlignedToLastTick(offset);
        }

        public ClockState GetCurrentState()
        {
            return storyboard.GetCurrentState();
        }

        public TimeSpan GetCurrentTime()
        {
            return storyboard.GetCurrentTime();
        }
    }
}

As you can see, we create a new Storyboard which will hold our transition. We use the ITransition interface that comes with the Toolkit.

When I was creating my first custom ITransition, I was running into several issues. We are effectively using the Begin()-Method and the Eventhandler Completed. But we have to implement all other Methods to get this class working.

Now let´s have a look to our second class, SplashScreenTransition.cs:

namespace SplashScreenTransition
{
    public class SplashScreenTransition : TransitionElement
    {
        public override ITransition GetTransition(UIElement element)
        {
            Storyboard FadingStoryBoard = CreateStoryBoard(1.0, 0.0);
            Storyboard.SetTarget(FadingStoryBoard, element);
            return new CustomTransition(FadingStoryBoard);
        }

        private Storyboard CreateStoryBoard(double from, double to)
        {
            Storyboard result = new Storyboard();
            DoubleAnimation animation = new DoubleAnimation();
            animation.From = from;
            animation.To = to;
            Storyboard.SetTargetProperty(animation, 
                new PropertyPath(UIElement.OpacityProperty));
            result.Children.Add(animation);
            return result;
        }

    }
}

With the code above we are connecting the animation itself to an UI-Element. To get this working, we need to create a simple opacity fading Storyboard which we connect to an UIElement. We connect the Storyboard to the GetTransition-Method by overriding it. What we get is our CustomTransition.

Now the only thing we have to do is to display the animation, which gets a bit tricky.

Create a new User Control. I added a a TextBlock and an Image to the sample.

Important:

  • set the value of d:DesignHeight to 800 (to cover the whole screen)
  • put your Image/TextBlock into a Stackpanel and set the Background. If you do not, the Background will be transparent and your MainPage will be visible

To display the custom SplashScreen and its animation, we have to create a Popup and a BackgroundWorker:

  • declare the names of both in your PhoneApplicationPage:
public partial class MainPage : PhoneApplicationPage
    {
        // declaration of BackgroundWorker and Popup
        BackgroundWorker bgWorker;
        Popup SplashPopup;
  •  next step is to add a new Popup which holds our SplashScreen-UserControl and start our BackgroundWorker:
// Constructor
        public MainPage()
        {
            InitializeComponent();

            //calling Popup, using our UserControl

            SplashPopup = new Popup() { IsOpen = true, Child = new SplashScreenControl() };
            bgWorker = new BackgroundWorker();
            RunBackgroundWorker();
        }
  •  Last but not least we have to get our BackgroundWorker to do some work and display the transition:
private void RunBackgroundWorker()
        {
            bgWorker.DoWork += ((s, args) =>
            {
                Thread.Sleep(5000);
            });

            bgWorker.RunWorkerCompleted += ((s, args) =>
            {
                this.Dispatcher.BeginInvoke(() =>
                {
                    SplashScreenTransition SplashScreenTrans = new SplashScreenTransition();
                    ITransition transition = SplashScreenTrans.GetTransition(this.SplashPopup.Child);
                    transition.Completed += delegate { this.SplashPopup.IsOpen = false; };
                    transition.Begin();
                 }
            );
            });
            bgWorker.RunWorkerAsync();
        }

If you would display only the SplashPopup, you would only set IsOpen to false. But we want to get the Fading out effect, so we call a new SplashScreenTransition.  Then we connect our custom transition to ITransition of the Toolkit and let the transition begin.

Essential is the delegation of the Completed Eventhandler. If you do not set the IsOpen of SplashPopup to false, the Popup remains open. That would result in a non-responding app.

The result of the work done above will look like this:

I hope this article was helpful for creating a smooth transition of your SplashScreen.

Download the sample code here.

Posted by msicc in Dev Stories, Windows Phone, wpdev, 0 comments