Monday, February 18, 2013

Flip Tile template for Windows Phone 8



Applies to: Windows Phone 8 only
The flip Tile template flips from front to back.
This template is specific to Windows Phone 8. For more info about Tiles in Windows Phone OS 7.1, see Windows Phone OS 7.1 Tile template.

Windows Phone Flip Tile template showcase image
The following image shows the API name associated with each aspect of the Tile template. You use theFlipTileData class to update any of these properties.
Windows Phone Flip Tile template properties
The following image describes sizing info for the flip Tile template.
Windows Phone Flip Tile template size information


You can create or update a flip Tile using either XML or code. There’s no way to know which Tile size your customer has pinned to Start, so you should include all elements.

Creating or updating a flip Tile using XML

The following code example shows how to create or update a flip Tile using XML.
xml version="1.0" encoding="utf-8"?>
<wp:Notification xmlns:wp="WPNotification" Version="2.0">
  <wp:Tile Id="[Tile ID]" Template="FlipTile">
    [small Tile size URI]</wp:SmallBackgroundImage>
    <wp:WideBackgroundImage Action="Clear">[front of wide Tile size URI]</wp:WideBackgroundImage>
    <wp:WideBackBackgroundImage Action="Clear">[back of wide Tile size URI]</wp:WideBackBackgroundImage>
    <wp:WideBackContent Action="Clear">[back of wide Tile size content]</wp:WideBackContent>
    <wp:BackgroundImage Action="Clear">[front of medium Tile size URI]</wp:BackgroundImage>
    <wp:Count Action="Clear">[count]</wp:Count>
    <wp:Title Action="Clear">[title]</wp:Title>
    <wp:BackBackgroundImage Action="Clear">[back of medium Tile size URI]</wp:BackBackgroundImage>
    <wp:BackTitle Action="Clear">[back of Tile title]</wp:BackTitle>
    <wp:BackContent Action="Clear">[back of medium Tile size content]</wp:BackContent>
  </wp:Tile>
</wp:Notification>

Creating or updating a flip Tile using code

The following code example shows how to create or update a flip Tile using C# code.
FlipTileData TileData = new FlipTileData()
{
   Title = "[title]",
   BackTitle = "[back of Tile title]",
   BackContent = "[back of medium Tile size content]",
   WideBackContent = "[back of wide Tile size content]",
   Count = [count],
   SmallBackgroundImage = [small Tile size URI],
   BackgroundImage = [front of medium Tile size URI],
   BackBackgroundImage = [back of medium Tile size URI],
   WideBackgroundImage = [front of wide Tile size URI],
   WideBackBackgroundImage = [back of wide Tile size URI],
};

Clearing a flip Tile

To clear a value for a property in XML, set the Action attribute to Clear for that property. To clear a value for a property in code, set the value to an empty string.














ref : http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj206971(v=vs.105).aspx

Wednesday, February 6, 2013

Make IIS not render pages as WML. Ever!

i have hosted my website on IIS server, sometimes my pages shows the html sorce code on the browser.

i was unable to understand WTF was really happening,

i was trying to findout the solution on google by searching queries like
- how to stop rendering html source code on browser or iis
....

after some time i came to know that is called a s WML .. .

and so on i have found this link..

1st solution
-------------

If you want a no-code/no-aspx change, you can add a browser capabilities file into the folder App_Browsers directly under your application root (if the folder's not there, just create it). To disable WML, simply put a file named ForceHtml.browser (anything ending in .browser) containing the following XML:

   refID="Default">
    
       name="preferredRenderingMime" value="text/html" />
       name="preferredRenderingType" value="html32" />
       name="preferredImageMime" value="image/gif" />
       name="tagwriter" value="System.Web.UI.HtmlTextWriter" />
    
markupTextWriterType="System.Web.UI.HtmlTextWriter" />
answered by Ruben

2nd solution
---------------------

We had this, and since we are using razor with html, the pages can't adapt automatically. For me, the simplest fix was to change the content-type in the _ViewStart.cshtml:
Response.ContentType = "text/html";
The "figure out the content-type yourself" insanity only happens when nothing is set explicitly. So... set it.
Your actual views can still override this:
@{
    Layout = null;
    Response.ContentType = "application/atom+xml";
}

answered by Marc Gravell

i have followed the 2nd solution today lets c is it fixing my problem or not ....


ref - http://stackoverflow.com/questions/1261144/make-iis-not-render-pages-as-wml-ever/5909281#5909281

Wednesday, January 30, 2013

Hide or not to hide the system tray in a Windows Phone 7 application?

Transparency and colors are now possible with Mango by setting its BackgroundColor and Opacity :

shell:SystemTray.IsVisible="True"
shell:SystemTray.BackgroundColor="Transparent"
shell:SystemTray.Opacity="0"
I would say by default show it unless it really gets in the way in a way you can't workaround, especially if its an app and not a game.

Tuesday, January 29, 2013

Saturday, January 26, 2013

Windows store app Installation : Purchse Error


While Installing an app from Windows store i got an error : 

"Purchase Error"

while reading some of the msdn forums and trying multiple solution the following one is helped to install app from the store.

install the following tool it will automatically fix the issues related to store.

This troubleshooter automatically fixes some issues that might prevent your apps from running, including suboptimal screen resolution and incorrect security or account settings.



Ref : http://answers.microsoft.com/en-us/windows/forum/windows_8-windows_store/anybody-knows-how-to-fix-windows-store-error-code/481ae2ae-b8cc-427a-9154-0ac8587b6f88

Friday, January 18, 2013

Thread.Sleep replacement in .NET for Windows Store

Thread.Sleep doesn't seem to be supported in .NET for Windows Store apps.

For example, this
            System.Threading.Thread.Sleep(1000);

Windows Store apps embrace asynchrony - and an "asynchronous pause" is provided by Task.Delay. So within an asynchronous method, you'd write:
await Task.Delay(TimeSpan.FromSeconds(30));
... or whatever delay you want. The asynchronous method will continue 30 seconds later, but the thread will not be blocked, just as for all await expressions.

How can I autoplay a video using the new embed code style for Youtube?


I think if you use replace "&" with "?" in the url the video will autoload.
So your url would be: http://www.youtube.com/embed/Tfy5CBfjZ8s?autoplay=1
Seems like Google should have made this available, but I would say using a "?" makes more sense than using the "&".