wpdev

Editorial: 2012 – what a year!

logo_white

The year is coming to an end soon, so I wanted to write a short summary of my 2012 with Microsoft and MSicc.net.

Screenshot (47)

I started the year with a clean install of the Windows 8 preview, and was using it since then as my main PC OS. Everyday I felt more in love with the speed of Windows 8 and the idea of using apps on a PC. Microsoft constantly updated their previews over the year, until the final release.

Also Windows Phone was getting new attraction with the awesome Lumia 900. Nokia and Microsoft started a big ad campaign to support the launch of this device. Surely some of you will remember of “The smartphone beta test is over”.

WP_20121225_069

Over the year, Microsoft did tease us a few times with Windows Phone Apollo. We all thought in the beginning that our existing devices will be getting the Apollo treatment, until MS unleashes some more details about Windows Phone 8. Windows Phone 8 shares a lot of the OS with Windows 8, so naturally there has to be new hardware. Windows Phone 7 will get 7.8, which will bring at least the look of the start screen to older devices.

WP_000586

Another beta program was launched for the Xbox Dashboard, which had better voice functionality, and of course another big thing: Internet Explorer on Xbox! That is really awesome as we are now able to surf the web with Kinect support as well as the Smart Glass app on your phone/tablet/PC.

Screenshot (51)

Which leads me to another fantastic release from Microsoft. The Smart Glass apps, no matter on which platform you will use it, extends the experience of films, games and also your Music experience.

Screenshot (48)

Talking about Music, Microsoft finally launched their Music Pass in Germany. Personally, I was waiting for this since the initial release of Windows Phone 7, and now they finally launched it. I did not wait a second to cancel my Spotify subscription, and switched to the Music Pass. And I love the experience, be it on WP7, WP8 or Windows 8/ Xbox, my collection is synched across all devices. I can choose which Songs I ‘ll keep in the cloud for streaming and which I download, so there is always a growing collection for me now.

I was also attending several developer days from Microsoft, which helped me in some parts of my own dev story. I updated Fishing Knots SE and plus several times this year and created I learn to tie my shoes, which is getting really good reviews all over the web. If you want to take a look at these apps, they all come with a test version, just type MSiccDev in the search, you will get a list with all of my apps.

Screenshot (52)

Sadly I have a bit trouble with the updated version of MSicc’s Blog for Windows Phone, I hope I can release it in early 2013, so you all can read and discuss or share articles from your phone.

Of course all of my Windows Phone apps will receive a special Windows Phone 8 update while keeping the work on the WP7 version.

I have also started development of a Windows 8 app for MSicc’s Blog, which I will submit in the early 2013 days to Microsoft to get it approved for the Windows 8 store.

Screenshot (53)

My personal highlight this year was to attend a keynote of Steve Ballmer himself, which was absolutely motivating as user and even more as developer. He really knows how to keep the crowd attending, and I really have to thank Microsoft Germany for this unique experience.

I want to thank Mark and Sean for joining me here on MSicc.net to entertain and inform you all, I bet we will see some awesome articles of both next year!

A big thanks also to the WPDev & Win8Dev community out there (you all know who you are). Keep up your great work and please keep the community alive!

Now I will come to an end with this post, as I want to further play around with my awesome Lumia 920 which Santa (aka my lovely wife) gifted me this year at Xmas.

What were your highlights this year? Leave a comment below!

As here in Germany is said for the new year wishes in advance: “Have a good slide into the new year”, stay safe and enjoy your time!

Posted by msicc in Editorials, 5 comments
[WPDEV] How a typo helped me to force SystemTray.Foreground to be White

[WPDEV] How a typo helped me to force SystemTray.Foreground to be White

Today was a sad day. My app was not going through Windows Phone Store certification because of logo issues., so I needed to change that all. That is bad on one side, because it really gets difficult to get the app approved now before the holidays.

But on the other side it was good, as I found some theming issues which I was able to iron  out. Well, at least nearly all of them.

One theming problem was remaining, no matter what I tried.

My app has its own theme, the ForegroundColor is White.  As I use the SystemTray to display the ProgressBar while loading data from the internet, I want it to be white, too (of course).

 

All was running good until I switched the phone’s background to light. The SystemTray was always black.

I tried several things, for example set in XAML:

 shell:SystemTray.ForegroundColor="White"

Next I tried to add it in code behind:

SystemTray.SetForegroundColor(this, Colors.White);

But my app seemed to ignore the word “White” completely. No error showed up, it just  did not work.

Finally, I tried to set it via the RGB code for white (255,255,255), but I made a typo in there:

 SystemTray.SetForegroundColor(this, Color.FromArgb(255, 254, 255, 255));

And the most funny thing is, it just worked!

 

Summary: Windows Phone seems to not like “White” in SystemTray. If you want to force it, just use the code above, and it will work!

I hope my typo will be helpful for some of you.

Happy coding!

Posted by msicc in Archive, 0 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 Archive, 4 comments

Smart little helper to clean HTML based strings for [WPDEV] and [WIN8DEV]

I thought I would share this small little class I created to clean out HTML based strings into readable strings. The class is both usable for your Windows Phone app as well as your Windows 8 app.

If you use cloud based or internet data, often strings contain “&ndash;” or “&#8211;” instead of their intended letter, like you can see on this image:

htmlstringuncleaned

The method uses Regex to replace all the wrong signs and clean out all of the unwanted signs. You can also add more to that if you need to replace wrong letters.

class CleanHTML
    {      
        public static string RemoveEncoding(string text)
        {
            try
            {
                string temp="";

                temp = 
                    Regex.Replace
                    (text.
                    Replace("&ndash;", "-").
                    Replace("&nbsp;", " ").
                    Replace("&rsquo;", "'").
                    Replace("&amp;", "&").
                    Replace("&#038;", "&").
                    Replace("&quot;", """).
                    Replace("&#039;", "'").
                    Replace("&#8230;", "...").
                    Replace("&#8212;", "—").
                    Replace("&#8211;", "-").
                    Replace("&#8220;", "“").
                    Replace("&#8221;", "”").
                    Replace("&#8217;", "'").
                    Replace("&#160;", " ").
                    Replace("&gt;", ">").
                    Replace("&rdquo;", """).
                    Replace("&ldquo;", """).
                    Replace("&lt;", "<").
                    Replace("&#215;", "×").
                    Replace("&#8242;", "′").
                    Replace("&#8243;", "″").
                    Replace("&#8216;", "'"),
                    "<[^<>]+>", "");

                return temp;
            }
            catch
            {
                return "";
            }
        }

        }

As we created a class for this little helper, you can call it from everywhere within you app to clean out the string. Here is one example I am using:

 item.title = CleanHTML.RemoveEncoding(item.title);

After calling this method, your string is plain text:

Screenshot (17)

I hope this post will be helpful for some of you.

Happy coding!

Posted by msicc in Archive, 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 Editorials, 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 Archive, 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 Archive, 0 comments
WPDEV: 2 tools that make localization of your Windows Phone apps easy

WPDEV: 2 tools that make localization of your Windows Phone apps easy

Today I want to show you two small tools that will help you to make localizing your apps easier.

 

Localizing in-app strings

The first tool I want you to know about is a tool called “AppTranslator”, made by Xda-Member singularity0821.

To provide the language settings, you need to name the strings in your app. I recommend to use format “x:name”, as sometimes without the “x:” your strings will not be accessible. Then you have to create a .resx file for your “neutral” language. You can find a good tutorial here at MSDN.

Once you have done this, you have to translate all strings and put them in a separate .resx file. Doing this manually in Visual Studio can really be an awful job. This is where the “AppTranslator” comes into the game.

apptranslator_1

As you can see it has a very clean UI. Everything you now have to do is to load your .resx file into the app and start to translate your app really fast:

apptranslator_2

You can save your work at every point, in the end you will get a ready to paste in .resx file.

You can download the tool here at xda.

 

Localizing app title

Ok, now you have localized your app content. But the app title will remain the one that you set in you “neutral language”.

To localize your app title, you have to generate resource-only DLLs. This could be very difficult if you are developing your apps with the VS 2010 Express. You simply can´t do it. An overview of how to do it manually and an explanation can be found here at MSDN.

No need to scream now, as also for this exists a tool from Patrick Getzmann, a German MVP.

AppTitleLocalizer

The tools uses Bing to translate your app title. You can edit all the strings also manually, if you want. Once you´re done, just hit “Save DLLs” and you are ready to integrate them into  your app.

The tool can be downloaded here.

I hope you will enjoy the tools as much as I do.

Posted by msicc in Archive, 3 comments

[WPDev] How-to create a tile without app title for Windows Phone

Every App has always a title on its dedicated tile for the Windows Phone start screen. But what if your tile icon contains already the title of your app?

Normally, you are setting the appearance of your app within the properties:

properties

If you have done this, your logo is displayed, but contains the title string. So how can we delete this?

In properties, you are not allowed to delete the name. You will face an error: “Title cannot be empty”.

You need to go to the Application Manifest and edit the XML manually. Go to solution explorer, and open the properties tree. With a double click on “WMAppManifest.xml” you will see the following Window:

wpappmanifest

To edit the title of the start screen, search for the section. Within this section, you will find a Title section, which contains the title of your app (as you have set within the properties). Now simply delete the title string.

TwTTile

If you now debug your application, you will see that your tile no longer displays the title.

I hope this short how-to will be helpful for you.

Posted by msicc in Archive, 1 comment
How to install the Windows Phone SDK 7.1.1 on W8CP (WPDev)

How to install the Windows Phone SDK 7.1.1 on W8CP (WPDev)

Screenshot (86)

This week Microsoft released the Windows Phone SDK 7.1.1 to us developers. If you are on Windows 7, you can hit the download  button and install the SDK, everything will go fine.

If you have used my tutorial on how to install the SDK on W8CP, things are a little different. You might face the following error message:

Screenshot (74)

The error says that the update is not applicable or is blocked by another condition on your computer (you can read more about that here). The Link to the KB-site does not offer anything helpful, so I played around to find a workaround.

Here is a my tutorial for installing the SDK in this case:

  • perform a “repair install” of the Windows Phone SDK 7.1.1
  • download the update
  • install the update, if no error shows up, everything will go fine
  • if you face the message again, abort the installation
  • download the update again
  • after second download, everything should go fine

I know this is a little bit confusing. In fact it was the only way for me to get the update installed. I tried several ways, and if a way did not work I restored the point before the repair install to get this tutorial done.

After the installation I also tried to open up my blog app on the 256 MB emulator. Of course I was curios whether my will start or not, luckily it did:

Screenshot (85)

So I hope with my little tutorial I was able to help you to get developing started with Windows 8 again. For my part I am happy, as I often code while I am at train, and in battery mode debugging on device does not work on W8CP.

Happy coding everyone!

Posted by msicc in Archive, 0 comments