How to create a WP8 wide tile in WP7 XNA...

Created on 31 October 2013 Written by Graham Smith

So, I recently discovered www.DVLUP.com, if you haven't heard of them they reward Windows Phone developers for taking part in various challenges which are aimed at improving the quality of your apps. Completing challenges earns you XP and once you've earned enough XP you can spend it on cool rewards like new devices and marketing campaigns.

However when looking through the challenges I noticed that most of them require your app to have "All 3 Live Tile Sizes", with both of my apps being XNA and targeting the 7.1 OS this presented a problem since the wide tile size isn't natively available. After doing some research I found a couple of different ways to add the wide tile but they required a lot of fiddling like renaming your XAP files to .ZIP and unpacking it to add the image... or another option was to use MangoPollo which is a sort of wrapper for using WP8 functionality in WP7 apps, but again it had problems like forcing the app to restart when adding the tile.

So... in the end i just sort of hacked my own solution using bits of code from both of the previously mentioned solutions, both of my apps have since passed certification and have been accepted for the DVLUP challenges. The only drawback is that the app has to be launched once before the wide tile will be available to the user... anyway heres how I did it:

Both of my Apps are built with XNA4 and im using Visual Studio 2012 with the WP8 SDK targeting 7.1 OS, the wide tile I create is just a static image but you can create a flip tile or whatever without too much fuss.

First thing to do is create the image for your wide tile, the dimensions are 691 × 336 pixels, once you've got your image create a new folder in your game project (I called the folder 'TileImg') then simply add your image to the folder with the following properties:

build action: none
copy to output directory: copy if newer


Now that we have the image for our wide tile we need to alter the WMAppManifest file, add the following code below <Deployment> and above <App> in your Manifest file:

  <AppExtra xmlns="" AppPlatformVersion="8.0">
    <Extra Name="Tiles"/>
</AppExtra>


Then in Game.cs we will need to make several changes, firstly we set our target OS to WP 7.8 because that's the first version to allow wide tiles (7.10.8858 is the official version of WP 7.8). Then we check what version OS the user has, if its greater than the target version then 'IsTargetedVersion' will be true:

       private static Version TargetedVersion = new Version(7, 10, 8858);
        public static bool IsTargetedVersion { get { return Environment.OSVersion.Version >= TargetedVersion; } }


Now we write a new static method, if the user has WP 7.8 or better installed on their phone then a new wide tile is created using the image we added earlier... if the OS is less than 7.8 then it does nothing (you'll also need to add 'using Microsoft.Phone.Shell;' to your using statements:  

        public static void CreateWideTile()
        {
            if (IsTargetedVersion)
            {
                try
                {
                    // Get the new FlipTileData type.
                    Type flipTileDataType = Type.GetType("Microsoft.Phone.Shell.FlipTileData, Microsoft.Phone");
                    // Get the ShellTile type so we can call the new version of "Update" that takes the new Tile templates.

                    Type shellTileType = Type.GetType("Microsoft.Phone.Shell.ShellTile, Microsoft.Phone");
                    // Loop through any existing Tiles that are pinned to Start.

                    foreach (var tileToUpdate in ShellTile.ActiveTiles)
                    {
                        // Get the constructor for the new FlipTileData class and assign it to our variable to hold the
                        Tile properties.

                        var UpdateTileData = flipTileDataType.GetConstructor(new Type[] { }).Invoke(null);
                       
                        // Set the properties. 
                        SetProperty(UpdateTileData, "WideBackgroundImage", new Uri("/TileImg/LargeTile.png",
                        UriKind.Relative));
                       

                        // Invoke the new version of ShellTile.Update.

                        shellTileType.GetMethod("Update").Invoke(tileToUpdate, new Object[] { UpdateTileData });
                        break;
                    }
                }
                catch
                {
                }
            }
        }

        private static void SetProperty(object instance, string name, object value)
        {
            var setMethod = instance.GetType().GetProperty(name).GetSetMethod();
            setMethod.Invoke(instance, new object[] { value });
        }


and finally we have to call the method we just created, we do this as soon as the app is launched:

        protected override void OnActivated(object sender, System.EventArgs args)
        {
            if (SaveComponent.wideTileCreated == false)
            {
                SaveComponent.wideTileCreated = true;
                CreateWideTile();
                SaveComponent.SaveWideTile();
            }
            base.OnActivated(sender, args);
        }

 

You'll notice that I have a flag called SaveComponent.wideTileCreated... once the app has checked the OS version and decided whether the wide tile should be created or not this flag is set to true and saved so that we never check again.

Well that's it... your users now have a nice new Wide Tile they can pin to their start screen and you can enter the DVLUP challenges :D

Comments   

 
0 #1284 918kiss 2019-01-20 08:58
That means keyword rich and relevant titles, summaries, descriptions, links and information material.
Staying active is method to be seen on Youtube.
Customers like these and motors do to.
Quote
 
 
0 #1283 918kiss 2019-01-20 08:58
That means keyword rich and relevant titles, summaries, descriptions, links and information material.
Staying active is method to be seen on Youtube.
Customers like these and motors do to.
Quote
 
 
0 #1282 scr888 kiss 2019-01-20 05:38
So put these to work techniques, and ask your site indexed by
Google or Yahoo almost immediately. You just need to register, mostly
for free, and is actually always instantaneous.
It should be further classified as quality leads.
Quote
 
 
0 #1281 lucky palace casino 2019-01-20 04:45
Search engines love good content and many links pointing to your website.
If someone catches your eye, you are able to their profile to see if you can picture yourself
working with them.
Quote
 
 
0 #1280 lucky palace casino 2019-01-20 04:44
Search engines love good content and many links pointing to your website.
If someone catches your eye, you are able to their profile to see if you can picture yourself
working with them.
Quote
 
 
0 #1279 sky 777 2019-01-20 01:36
She will be judging you long before you take any steps towards your ex.
The Church tend to be irritating if we're true towards One we
follow. The only person standing inside your way is basically
that you.
Quote
 
 
0 #1278 sky 777 2019-01-20 01:36
She will be judging you long before you take any steps towards your ex.
The Church tend to be irritating if we're true towards One we
follow. The only person standing inside your way is basically
that you.
Quote
 
 
0 #1277 3win8 slot 2019-01-19 23:54
Maybe only need don't learn to write effective articles.

This click starts from $0.50 did not take long can grow to $40 to $50.

They will then give you your own link that it's possible to promote.
Quote
 
 
0 #1276 play8oy apk file 2019-01-19 17:40
This info is worth everyone's attention. How can I find out more?
Quote
 
 
0 #1275 play8oy apk file 2019-01-19 17:40
This info is worth everyone's attention. How can I find out more?
Quote
 
 
0 #1274 playboy casino 2019-01-19 15:15
I know this if off topic but I'm looking into starting my own weblog and was curious what all is needed to get set up?

I'm assuming having a blog like yours would cost a pretty penny?
I'm not very internet smart so I'm not 100% positive.

Any suggestions or advice would be greatly appreciated.
Kudos
Quote
 
 
0 #1273 playboy casino 2019-01-19 15:15
I know this if off topic but I'm looking into starting my own weblog and was curious what all is needed to get set up?

I'm assuming having a blog like yours would cost a pretty penny?
I'm not very internet smart so I'm not 100% positive.

Any suggestions or advice would be greatly appreciated.
Kudos
Quote
 
 
0 #1272 3win8 test acc 2019-01-19 13:58
I visited several sites but the audio feature for audio songs present at this web page is
really marvelous.
Quote
 
 
0 #1271 ntc33 login 2019-01-19 13:37
We are a group of volunteers and opening a new scheme in our community.
Your web site offered us with valuable info to work on. You have done
a formidable job and our entire community will be grateful to you.
Quote
 
 
0 #1270 scr888 bonus 100 2019-01-19 12:22
Hi, I do think this is a great site. I stumbledupon it ;) I am
going to come back yet again since i have saved as a favorite it.
Money and freedom is the greatest way to change, may you be
rich and continue to help other people.
Quote
 
 
0 #1269 3win8 cara menang 2019-01-19 12:14
You really make it seem so easy along with your presentation but I find this matter to be really
something which I think I might never understand. It kind of
feels too complicated and very broad for me. I'm looking ahead to your
next publish, I will try to get the hang of it!
Quote
 
 
0 #1268 3win8 cara menang 2019-01-19 12:13
You really make it seem so easy along with your presentation but I find this matter to be really
something which I think I might never understand. It kind of
feels too complicated and very broad for me. I'm looking ahead to your
next publish, I will try to get the hang of it!
Quote
 
 
0 #1267 casino games ideas 2019-01-19 11:34
Thanks for sharing your thoughts on windows phone. Regards
Quote
 
 
0 #1266 scr888 company 2019-01-19 08:50
This is commonly software, video, images or articles. So a your website itself writer understands SEO is vital.

Perhaps you will see that providing usefulness for others can work like wizardry.
Quote
 
 
0 #1265 scr888 company 2019-01-19 08:49
This is commonly software, video, images or articles. So a your website itself writer understands SEO is vital.

Perhaps you will see that providing usefulness for others can work like wizardry.
Quote
 
 
0 #1264 slot mobile bg 2019-01-19 07:24
It's very simple to find out any topic on web as compared
to textbooks, as I found this piece of writing at this site.
Quote
 
 
0 #1263 2011 mlb draft 2019-01-19 00:25
You should lay down on the floor and scoop out each the dirt from the bottom of the pit.
These windows cost more, but they lower energy bills minimize outside noise.
Quote
 
 
0 #1262 2011 mlb draft 2019-01-19 00:25
You should lay down on the floor and scoop out each the dirt from the bottom of the pit.
These windows cost more, but they lower energy bills minimize outside noise.
Quote
 
 
0 #1261 las vegas nightlife 2019-01-18 22:31
Many times they are listed beginning of the final
results. Press releases are also an excellent way to dispose of
your oppinion. So, what a person been going
place in its pages? You can use trivia questions if men and
women.
Quote
 
 
0 #1260 las vegas nightlife 2019-01-18 22:30
Many times they are listed beginning of the final
results. Press releases are also an excellent way to dispose of
your oppinion. So, what a person been going
place in its pages? You can use trivia questions if men and
women.
Quote
 
 
0 #1259 live blackjack nyc 2019-01-18 09:54
Signifies being commensurate with your quality and price image.
The reason why aren't you making a lot of money? It may be
that our prayers for justice activate the power of
lifestyle force that is God.
Quote
 
 
0 #1258 live blackjack nyc 2019-01-18 09:53
Signifies being commensurate with your quality and price image.
The reason why aren't you making a lot of money? It may be
that our prayers for justice activate the power of
lifestyle force that is God.
Quote
 
 
0 #1257 scr 888 2019-01-18 06:01
Final Order - motivating the time when crucial to take most notification. It holds true that in any
gathering, perform tell who the 'wide readers' may be.
Quote
 
 
0 #1256 scr 888 2019-01-18 06:00
Final Order - motivating the time when crucial to take most notification. It holds true that in any
gathering, perform tell who the 'wide readers' may be.
Quote
 
 
0 #1255 joker123 download 2019-01-18 04:08
Does your site have a contact page? I'm having trouble locating it but,
I'd like to send you an email. I've got some recommendations for your blog you might be interested in hearing.
Either way, great site and I look forward to
seeing it develop over time.
Quote
 
 
0 #1254 Peter 2019-01-17 22:12
Further discounts are provided people who does come around and stay during the
wintertime season. In the outside world, WPC furthermore reveals its own power.
Keep those small appliances to a bare minimal amount.
Quote
 
 
0 #1253 Peter 2019-01-17 22:11
Further discounts are provided people who does come around and stay during the
wintertime season. In the outside world, WPC furthermore reveals its own power.
Keep those small appliances to a bare minimal amount.
Quote
 
 
0 #1252 918kiss 2019-01-17 19:57
Often, you will find them being included in exhibitions. A person respect others you are enhancing your personality
by some means. Always wear the dress to have complete idea within the look.
Quote
 
 
0 #1251 rollex11 casino apk 2019-01-17 18:49
CONTENT: This, again, can be a simple considered.
The reality is that 90% of courses shows you nothing.

So, businesses someone the particular product your
referring a person are give them no reasons to?
Quote
 
 
0 #1250 rollex11 casino apk 2019-01-17 18:49
CONTENT: This, again, can be a simple considered.
The reality is that 90% of courses shows you nothing.

So, businesses someone the particular product your
referring a person are give them no reasons to?
Quote
 
 
0 #1249 lpe888 lucky place 2019-01-17 18:28
God hears your prayers and then they do develop a difference.
Worry will creep into your mind, allowing you open to second guessing
your plans and blueprints. Wink at him discreetly, send
a flying kiss and throw him bewitching smiles.
Quote
 
 
0 #1248 lpe888 lucky place 2019-01-17 18:27
God hears your prayers and then they do develop a difference.
Worry will creep into your mind, allowing you open to second guessing
your plans and blueprints. Wink at him discreetly, send
a flying kiss and throw him bewitching smiles.
Quote
 
 
0 #1247 3win8 apk 2019-01-17 16:11
Hey there! I'm at work browsing your blog from my new iphone 3gs!
Just wanted to say I love reading your blog and look forward to all your posts!
Keep up the fantastic work!
Quote
 
 
0 #1246 3win8 apk 2019-01-17 16:10
Hey there! I'm at work browsing your blog from my new iphone 3gs!
Just wanted to say I love reading your blog and look forward to all your posts!
Keep up the fantastic work!
Quote
 
 
0 #1245 mega888 apk 2019-01-17 11:49
If a person new for the game, it may be some time before you
find results. Also to be able to in the blogosphere as utility post.
Guess what that caption could be a little more?
Quote
 
 
0 #1244 scr888 pro hack apk 2019-01-17 08:19
People will share these videos and article theirselves site they will feel them relevant.
As well as head to the search engines, and locate the "Add URL" page.
They are in effect my colleagues on the world.
Quote
 
 
0 #1243 a333 2019-01-16 22:04
He will note that within pair of days, the will pour into the individual account.
There is no better for you to grow your online business than through Internet
article writing.
Quote
 
 
0 #1242 ace333 download 2019-01-16 15:49
They will become fans and come begging back for any more.
This is an extremely good way of getting initial traffic for this site.
You can't just create a post and end up forgetting about this task.
Quote
 
 
0 #1241 ace333 download 2019-01-16 15:49
They will become fans and come begging back for any more.
This is an extremely good way of getting initial traffic for this site.
You can't just create a post and end up forgetting about this task.
Quote
 
 
0 #1240 sky777 casino 2019-01-16 10:29
You love them both, and wish they'd make balance.

For example, surgery can assistance in sagging happens in the mid-face.
Did he investigate some of the behavior that you just shrugged off?
Quote
 
 
0 #1239 sky777 casino 2019-01-16 10:28
You love them both, and wish they'd make balance.

For example, surgery can assistance in sagging happens in the mid-face.
Did he investigate some of the behavior that you just shrugged off?
Quote
 
 
0 #1238 playboy casino rodos 2019-01-16 08:35
I like the helpful information you provide in your articles.

I'll bookmark your weblog and check again here regularly.
I am quite certain I will learn lots of new
stuff right here! Good luck for the next!
Quote
 
 
0 #1237 playboy casino rodos 2019-01-16 08:34
I like the helpful information you provide in your articles.

I'll bookmark your weblog and check again here regularly.
I am quite certain I will learn lots of new
stuff right here! Good luck for the next!
Quote
 
 
0 #1236 live poker backing 2019-01-16 00:47
Inspiring story there. What occurred after? Thanks!
Quote
 
 
0 #1235 live poker backing 2019-01-16 00:46
Inspiring story there. What occurred after? Thanks!
Quote
 
 
0 #1234 Sandy 2019-01-15 22:26
Wow! After all I got a webpage from where I know how to in fact take helpful information regarding my study
and knowledge.
Quote
 
 
0 #1233 lucky palace casino 2019-01-15 21:59
Each prospect that discovers what you are offering will be at a different level of
comfort in spending money using you. Assists you however become
older and face tough ailments. Look as you own the room, anywhere
you go.
Quote
 
 
0 #1232 slot game joker 123 2019-01-15 21:08
When someone writes an piece of writing he/she
retains the plan of a user in his/her brain that how a user can be aware of it.
Therefore that's why this paragraph is outstdanding. Thanks!
Quote
 
 
0 #1231 online casino pa 2019-01-15 20:37
I love what you guys are usually up too. This kind of clever work and coverage!
Keep up the good works guys I've incorporated you guys to my own blogroll.
Quote
 
 
0 #1230 mega casino coupon 2019-01-15 16:15
Your style is so unique compared to other people I have read
stuff from. Many thanks for posting when you've got the opportunity, Guess I will just book mark this site.
Quote
 
 
0 #1229 n33 2019-01-15 16:03
Use market and keyword research to determine what people want for answers
on. It one more important that a site already been around to
order while. But the Meta Description tag still holds pleasant.
Quote
 
 
0 #1228 2011 mlb draft 2019-01-15 12:02
Run it until the very last thing the water is taken out of the problem.
It's only paint, you should re-paint it later.
A new chimney, for example, can last up together with 100 seasons.
Quote
 
 
0 #1227 rollex11 download 2019-01-15 06:58
For, the link popularity is among the list of major tools to decide your the major
search engines ratings. You cannot solicit people to see
your site and click on the listings. That doesn't suggest I'm
going to ignore key phrases.
Quote
 
 
0 #1226 ntc33 download 2019-01-15 06:52
You don't want people coming to all of your site and immediately
stepping out of. This article was written simply give you a nudge in the suitable direction. Remember to always choose for short sentences and
easy language.
Quote
 
 
0 #1225 casino malaysia 2019-01-15 01:45
You will probably be the business to invest capital and carry a return on that
investment. They will more than likely take just like
of proper your car as they do their tools.
Quote
 
 
0 #1224 rollex11 download 2019-01-15 00:32
May long process . that can be full many ups and downs.
but well this in the finish! However, for almost us the opposite is genuine.
Losing weight is a headache of lots of people.
Quote
 
 
0 #1223 rollex11 download 2019-01-15 00:32
May long process . that can be full many ups and downs.
but well this in the finish! However, for almost us the opposite is genuine.
Losing weight is a headache of lots of people.
Quote
 
 
0 #1222 joker123 net mobile 2019-01-14 16:21
This post will assist the internet visitors for building up new
blog or even a blog from start to end.
Quote
 
 
0 #1221 sky777 casino 2019-01-13 21:20
Awesome! Its truly remarkable post, I have got much clear idea
on the topic of from this paragraph.
Quote
 
 
0 #1220 strong wordpress 2019-01-13 20:36
Once you create good content that sticks, it is worth the time it popularized
create in which. To start advertising your goods try writing articles, reports, reviews or even case folks.
Quote
 
 
0 #1219 strong wordpress 2019-01-13 20:36
Once you create good content that sticks, it is worth the time it popularized
create in which. To start advertising your goods try writing articles, reports, reviews or even case folks.
Quote
 
 
0 #1218 r11 2019-01-13 17:10
Such forums have a high Pagerank, and are themselves considered authority webpages.

So give them some useful information they will use.
Kim subscribed with Associated Content in March of 2007.
Quote
 
 
0 #1217 playboy888 2019-01-12 13:08
I've been exploring for a little for any high-quality articles or blog posts on this
kind of house . Exploring in Yahoo I finally stumbled upon this web site.

Studying this information So i'm glad to express
that I've an incredibly excellent uncanny feeling I came upon exactly what I needed.
I so much unquestionably will make certain to don?t put out of
your mind this site and provides it a look regularly.
Quote
 
 
0 #1216 playboy888 2019-01-12 13:07
I've been exploring for a little for any high-quality articles or blog posts on this
kind of house . Exploring in Yahoo I finally stumbled upon this web site.

Studying this information So i'm glad to express
that I've an incredibly excellent uncanny feeling I came upon exactly what I needed.
I so much unquestionably will make certain to don?t put out of
your mind this site and provides it a look regularly.
Quote
 
 
0 #1215 918kiss game hacker 2019-01-12 02:35
Take shots of your daughter in multiple settings and many clothes.
The actual on Amazon for a Kindle version is $7.99, but used physical copies
sell smaller on your website. This data was used to rank web pages.
Quote
 
 
0 #1214 918kiss game hacker 2019-01-12 02:35
Take shots of your daughter in multiple settings and many clothes.
The actual on Amazon for a Kindle version is $7.99, but used physical copies
sell smaller on your website. This data was used to rank web pages.
Quote
 
 
0 #1213 scr888 vip id 2019-01-12 01:52
Quality posts is the key to invite the visitors to
pay a visit the web site, that's what this site is providing.
Quote
 
 
0 #1212 scr888 vip id 2019-01-12 01:52
Quality posts is the key to invite the visitors to
pay a visit the web site, that's what this site is providing.
Quote
 
 
0 #1211 918 Kiss 2019-01-11 23:01
If you desire to increase your know-how just keep visiting this site and be updated with the
most up-to-date news update posted here.
Quote
 
 
0 #1210 918 Kiss 2019-01-11 23:01
If you desire to increase your know-how just keep visiting this site and be updated with the
most up-to-date news update posted here.
Quote
 
 
0 #1209 scr888 kiss 2019-01-11 14:16
Place Adsense Ads in familiar, yet not annoying aspects.
Both folks will take pleasure from the efforts you both
do develop your sites traffic. Not all are
worthwhile respectable blog.
Quote
 
 
0 #1208 mega 888 2019-01-11 10:10
If you could have a good content on your website, Google will reward your
website with high rankings. A static Website is
really a newspaper, while weblog is to sign up. Surf your way through Facebook or twitter.
Quote
 
 
0 #1207 link play8oy 2019-01-11 10:10
All it needs is, the watch for detail, and your interest
to maintain a proper public image for by hand. Seems like a foreign language,
doesn't it? You tend display the world the feelings you have inside individuals.
Quote
 
 
0 #1206 link play8oy 2019-01-11 10:09
All it needs is, the watch for detail, and your interest
to maintain a proper public image for by hand. Seems like a foreign language,
doesn't it? You tend display the world the feelings you have inside individuals.
Quote
 
 
0 #1205 r11 2019-01-11 08:31
Such forums have a high Pagerank, and are themselves considered authority spots.
So give them some useful information that they could
use. Kim joined with Associated Content in March of 2007.
Quote
 
 
0 #1204 r11 2019-01-11 08:31
Such forums have a high Pagerank, and are themselves considered authority spots.
So give them some useful information that they could
use. Kim joined with Associated Content in March of 2007.
Quote
 
 
0 #1203 playboy casino 2019-01-10 16:48
These are some of this fundamentals of web design Springfield have
to have to keep in mind. Then i have a coaching program on this topic also.
So write content that is short and gets to the point.
Quote
 
 
0 #1202 playboy casino 2019-01-10 16:48
These are some of this fundamentals of web design Springfield have
to have to keep in mind. Then i have a coaching program on this topic also.
So write content that is short and gets to the point.
Quote
 
 
0 #1201 playboy casino 2019-01-10 16:47
These are some of this fundamentals of web design Springfield have
to have to keep in mind. Then i have a coaching program on this topic also.
So write content that is short and gets to the point.
Quote
 
 
0 #1200 l22 2019-01-10 11:08
Don't underestimate the time and learning curve with rrnternet
site builders. By placing your links carefully and consistently, you will
slowly transform residual livelihood. Most press release services are
free, however some are settled.
Quote
 
 
0 #1199 l22 2019-01-10 11:08
Don't underestimate the time and learning curve with rrnternet
site builders. By placing your links carefully and consistently, you will
slowly transform residual livelihood. Most press release services are
free, however some are settled.
Quote
 

Add comment


Security code
Refresh

Facebook YouTube

Latest on Twitter

SuperSmithBros @Ravanok Ha... It's a cool game too, easily the best and most fun project I've worked on 😁.
SuperSmithBros The woes of being an #indiedev with an NDA 😭 https://t.co/Lj0lQZBF2C
SuperSmithBros @sophiablue18 You know you have the power of words and can ask her to move it?
SuperSmithBros @NetflixUK On the Samsung TV app you don't display what language a movie is. Please change it so it displays the la… https://t.co/YtncBZlrar
SuperSmithBros RT @MarcusJLGardner: Graduated with @JamieKKing, @SuperSmithBros and @Polygonical from @MoonshineGS today! Looking forward to our many year…