Kamis, 20 Maret 2014

WindowsPhone 8 Resource File:How to Bind Image From Resource File(C#-XAML)

Introduction:

It is best practices, we may need to xaml directly bind the image from resource file instead of rewriting code from c#.however i am going to introduce how can we bind image from resource file in windows phone . 
Source File at :WPResourceFileSample

Requirements: 

There is no need for futher dll's.you just unzip this sample and run it windows phone 8 sdk.

Note: This sample is not working on windows 7.0/7.1/7.5

Description:

However we can't directly bind image from resource file
XAML

<Image x:Name="imgStatus" Source="{Binding Path=LocalizedResources.photo_3, Source={StaticResource LocalizedStrings}}" Margin="0,57,0,104"/>
 Here i tried to bind Photo_3.jpg image from resource file.But it won't work beacuse in above code Path=LocalizedResources.photo_3 returns imagebytes and not a stream.
so that we need to convert it to bitmapimage using following BytestoImage converter class

Converter for bytes to bitmapimage :


C#
public class BytesToImageConverter : IValueConverter 
    { 
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
        { 
            if (value != null && value is byte[]) 
            { 
                byte[] bytes = value as byte[]; 
                MemoryStream stream = new MemoryStream(bytes); 
                BitmapImage image = new BitmapImage(); 
                image.DecodePixelType = DecodePixelType.Logical; 
                image.CreateOptions = BitmapCreateOptions.BackgroundCreation; 
                image.CreateOptions = BitmapCreateOptions.DelayCreation; 
                var bitmapImage = PictureDecoder.DecodeJpeg(stream, 480, 856); 
                if (bitmapImage.PixelHeight > bitmapImage.PixelWidth) 
                { 
                    image.DecodePixelWidth = 56; 
                    image.DecodePixelHeight = 100; 
                } 
                else 
                { 
                    image.DecodePixelWidth = 100; 
                    image.DecodePixelHeight = 56; 
                } 
                image.SetSource(stream); 
                return image; 
            } 
 
            return null; 
 
        } 
 
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
        { 
            throw new NotImplementedException(); 
        }
 And use above converter class in your xaml like this way
XAML
<phone:PhoneApplicationPage.Resources> 
        <n:BytesToImageConverter x:Name="ByteToImage">/n:BytesToImageConverter>  
</phone:PhoneApplicationPage.Resources> 
<Image x:Name="imgStatus" Source="{Binding Path=LocalizedResources.photo_3, Source={StaticResource LocalizedStrings},Converter={StaticResource ByteToImage}}" Margin="0,57,0,104"/>
 So that now its working,and image will be bind to image control and appeared like this way,



2)How to get  image from resource file with c#

C#

byte[] imageBytes = AppResources.photo_3;//getting image from resource file which returns image bytes 
BitmapImage bitmapImage = new BitmapImage(); 
MemoryStream ms = new MemoryStream(imageBytes); 
bitmapImage.SetSource(ms); 
imgStatus.Source = bitmapImage;

 3)How to get resource file strings with c#


C#
string text = AppResources.ApplicationTitle;
 In xaml
XAML
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
Note: Please share your thoughts,what you think about this post,Is this post really helpful for you?otherwise it would be very happy ,if you have any thoughts for to implement this requirement in any another way?I always welcome if you drop comments on this post and it would be impressive.


Have a nice day by  :)

Rabu, 19 Maret 2014

Windows Phone Ink Support:signature capturing and save to media library with image format in c#

Introduction

Recently I heard about one interesting requirement is "user signing on the screen and it need to be store that signature into media library when user capture it  and also show it again in image control ",and its quietly similar to we are signing signature after taking the post from postman,so we may need to implement this one in device


Source File at :WindowsPhoneSignatureSample


Building the Sample

However to implement this sample ,we are not need for any other dll's. Because Ink support is available for windows phone 8.0 &windows phone 7.1
Note:I am not sure ,Ink support is available for windows phone 7.0


Description 


 we can implement this kind of signature application using two ways
1) By manipulating the canvas events such as ManipulationStarted,ManipulationDelta,ManipulationCompleted :Please refer this one if you want to implement though canvas Capture User Signatures with canvas
2)Using InkPresenter 
However in above two ways ,i recommend second one is using InkPresenter
InkPresenter:provides a drawing surface to support ink features. InkPresenter derives from Canvas and can display one or more UIElement objects and a StrokeCollection.
So that we need to follow some few steps,to meet our requirement

1)How to use InkPresenter in xaml

XAML

<Canvas> 
    <TextBlock Text="InkPresenter Control" FontWeight="Bold" Margin="50,30,0,0" /> 
    <Rectangle Height="500" Width="500" Margin="50,50,0,0" Stroke="Black" /> 
    <InkPresenter x:Name="MyIP" Height="500" Width="500" 
              Margin="50,50,0,0" 
              MouseLeftButtonDown="MyIP_MouseLeftButtonDown"  
              LostMouseCapture="MyIP_LostMouseCapture"  
              MouseMove="MyIP_MouseMove"  
              Background="Transparent" Opacity="1" /> 
</Canvas>
 To change Inkpresenter color in c# with stroke,


C#

NewStroke.DrawingAttributes.Color = Colors.Red;
 To write signature on the screens ,we must take adavnates of inkpresenter mouse events like this way 
C#
private void MyIP_MouseLeftButtonDown(object sender, MouseEventArgs e) 
{ 
     
                StylusPointCollection MyStylusPointCollection = new StylusPointCollection(); 
                MyStylusPointCollection.Add(e.StylusDevice.GetStylusPoints(MyIP)); 
                NewStroke = new Stroke(MyStylusPointCollection); 
                NewStroke.DrawingAttributes.Color = Colors.Red; 
                MyIP.Strokes.Add(NewStroke); StylusPointCollection ErasePointCollection = new StylusPointCollection(); 
}


C#
private void MyIP_MouseMove(object sender, MouseEventArgs e) 
{ 
   if (NewStroke != null) 
                NewStroke.StylusPoints.Add(e.StylusDevice.GetStylusPoints(MyIP)); 
}
 2)How to Clear InkPresenter value in C# 
C#

MyIP.Strokes.Clear();
 3)How to erase InkPresenter value in C#
C#
 private void MyIP_MouseMove(object sender, MouseEventArgs e)
{
if (eraseflag == false)
{
StylusPointCollection pointErasePoints = e.StylusDevice.GetStylusPoints(MyIP);
StrokeCollection hitStrokes = MyIP.Strokes.HitTest(pointErasePoints);
if (hitStrokes.Count > 0)
{
foreach (Stroke hitStroke in hitStrokes)
{
MyIP.Strokes.Remove(hitStroke);
// undoStack.Push(hitStroke);
// undoStateBufferStack.Push(true);
}
}
}
if (NewStroke != null)
NewStroke.StylusPoints.Add(e.StylusDevice.GetStylusPoints(MyIP));
}
 4)How to Undo and Redo InkPresenter value in C#
C#
private void btnUndo_Click(object sender, RoutedEventArgs e) 
        { 
            if (MyIP.Strokes != null && MyIP.Strokes.Count > 0) 
            { 
                _removedStrokes.Push(MyIP.Strokes.Last()); 
                MyIP.Strokes.RemoveAt(MyIP.Strokes.Count - 1); 
            } 
            else 
            { 
                MessageBox.Show("Note:There is no signature line to undo!"); 
            } 
        }
C#
 private void btnRedo_Click(object sender, RoutedEventArgs e) 
        { 
            if (_removedStrokes != null && _removedStrokes.Count > 0) 
            { 
                MyIP.Strokes.Add(_removedStrokes.Pop()); 
            } 
            else 
            { 
                MessageBox.Show("Note:There is no signature line to redo!"); 
            } 
        }
5)How to Capture InkPresenter signature of Image format in C#

C#
private void btncaprture_Click(object sender, RoutedEventArgs e) 
        { 
            if (MyIP.Strokes != null && MyIP.Strokes.Count > 0) 
            { 
                WriteableBitmap wbBitmap = new WriteableBitmap(MyIP, new TranslateTransform()); 
                EditableImage eiImage = new EditableImage(wbBitmap.PixelWidth, wbBitmap.PixelHeight); 
 
                try 
                { 
                    for (int y = 0; y < wbBitmap.PixelHeight; ++y) 
                    { 
                        for (int x = 0; x < wbBitmap.PixelWidth; ++x) 
                        { 
                            int pixel = wbBitmap.Pixels[wbBitmap.PixelWidth * y + x]; 
                            eiImage.SetPixel(x, y, 
                            (byte)((pixel >> 16) & 0xFF), 
                            (byte)((pixel >> 8) & 0xFF), 
                            (byte)(pixel & 0xFF), (byte)((pixel >> 24) & 0xFF) 
                            ); 
                        } 
                    } 
                } 
                catch (System.Security.SecurityException) 
                { 
                    throw new Exception("Cannot print images from other domains"); 
                } 
 
                // Save it to disk 
                Stream streamPNG = eiImage.GetStream(); 
                StreamReader srPNG = new StreamReader(streamPNG); 
                byte[] baBinaryData = new Byte[streamPNG.Length]; 
                long bytesRead = streamPNG.Read(baBinaryData, 0, (int)streamPNG.Length); 
 
                IsolatedStorageFileStream isfStream = new IsolatedStorageFileStream("tempsignature.png", FileMode.Create, IsolatedStorageFile.GetUserStoreForApplication()); 
                isfStream.Write(baBinaryData, 0, baBinaryData.Length); 
                isfStream.Close(); 
 
                //Show to image 
                isfStream = new IsolatedStorageFileStream("tempsignature.png", FileMode.Open, IsolatedStorageFile.GetUserStoreForApplication()); 
 
                biImage.SetSource(isfStream); 
                isfStream.Close(); 
                ucImg.Visibility = Visibility.Visible; 
                ucImg.SignCapture.Source = biImage; 
                savebtn.IsEnabled = true; 
                TitlePanel.IsHitTestVisible = false; 
                ContentPanel.IsHitTestVisible = false; 
            } 
            else 
            { 
                MessageBox.Show("Note:There is no signature line to capture!"); 
            } 
        }
 6)How to save InkPresenter signature Image to media library

C#

 private void savebtncaprture_Click(object sender, RoutedEventArgs e) 
        { 
            var result = MessageBox.Show("Are you sure save signature to media library?", "", MessageBoxButton.OKCancel); 
            if (result == MessageBoxResult.OK) 
            { 
                WriteableBitmap wb = new WriteableBitmap(biImage); 
                using (var stream = new MemoryStream()) 
                { 
                    // Save the picture to the Windows Phone media library. 
                    wb.SaveJpeg(stream, wb.PixelWidth, wb.PixelHeight, 0, 100); 
                    stream.Seek(0, SeekOrigin.Begin); 
                    new MediaLibrary().SavePicture("tempsignature.png", stream); 
                } 
            } 
        } 
 7)ScreenShots


FeedBack Note:
Please share your thoughts,what you think about this post,Is this post really helpful for you?I always welcome if you drop comments on this post and it would be impressive.
Follow me always at  
Have a nice day by  :)

Rabu, 12 Maret 2014

Windows Phone 8.1 Expected New Features c#

Microsoft recently sent out invitations to developers for initial testing of the new Windows Phone 8.1 update and its Software Development Kit (SDK). A few of the features have leaked through screenshots shared by developers.
Windows Phone 8.1
Considering the numerous changes listed below, which include features like Quiet Hours and Office Lens support, the upcoming Windows Phone 8.1 will be a complete overhaul, but not just an increment update, notes WPCentral.
The listed features are being pulled from the MUI string of the emulator's file system. These are subject to change in the final release as the current SDK is just a preview.

 Windows Phone 8.1 new features

  • Sharing secured Wi-Fi Networks with contacts if they have Wi-Fi Sense. They don't get to see the shared password though
  • Social notifications will now show up in Action Center by swiping from the top of the screen
  • Operators can now control Data Sense limits remotely
  • Operators can also install certain applications once a SIM card is detected
  • Along with normal updates, there are now "important" updates
  • Options to always download emails and pictures within them
  • Encrypted and signed e-mail support
  • Change default SMS app. You can also change which SMS app will show notifications
  • Enterprise enrolled phones can have their passwords changed and remotely locked
  • "Write, when I swipe through letters." That should be self-explanatory
  • Geofence monitoring support. Geofence is a boundary around a place of interest to you. Location services can monitor geofences to tell your apps when you are entering and leaving them. This would be really good for IFTTT
  • Office Lens support. Will scan in documents and screens
  • The phone will have to update to the latest version before you can restore it to factory settings
  • Option to update store apps automatically
  • Option to update store apps when only on Wi-Fi
  • App Suggestions by location
  • Manual Update checks
  • Password protected Office document support
  • Trusted app list for NFC that will remove the need for asking whether you want to open a particular app
  • In-call speech commands. You will be able to say 'Call XXXXXX'
  • Double-Tap to unlock your phone (Feature from Lumia devices on Amber Update and newer)
  • Quiet Hours
  • Double Tap to Power Off
  • Notification if charger is not of adequate power
  • Screenshot button combination is now Power + Volume Up
  • Chkdsk for SD Cards essentially
  • Apps on SD Cards are only allowed from ONE originating phone. If it detects that apps from another phone are installed on the SD Card, then it will ask to delete those first
  • Voice Narrator for Accessibility
  • The Search button will be the new way to open Speech instead of the Start button (Since the newer phones will have the start button on screen)
  • New Email sync options with accordance to usage patterns (i.e. If you get a lot of mail on particular days and if you don't check mail every day)
  • Change the size and amount of tiles on your start screen.
  • Wallet supports tickets and membership cards
  • App Syncing
  • Backups now include application data (ABOUT TIME)
  • Screen Reader functionality (May be Text-To-Speech for apps)
  • Screen Recording functionality
  • Inner Circle of contacts. Up to 40 contacts can be in the inner circle
  • You can favorite photos by tapping a heart icon
  • Virtual SmartCard support
Hopefully, users will get to see these features in the final release of Windows Phone 8.1, which is expected at Microsoft's BUILD developer conference scheduled to be held from 2-4 April.
I hope windows phone will be having very good features with this updates.
Note: Please share your thoughts,what you think about windows phone 8.1 blue,Is these expected features will helpful for windows phone will be stands at top place in mobile world?otherwise you have any thoughts for wp8.1?

Have a nice day by  :)

Selasa, 11 Maret 2014

UI Design Guidelines for Windows Phone 8

1- Elements Alignment and Margins

- All pages should respect the 12px or 24px margin on the left.
- Content, titles, headers, and header logos should be left aligned to 12px or 24px margin.
- If right alignment is required, the right edge margin will be also 12px or 24px.
           dps-ux-bar        dps-ux-bar_1

- Tip:  Check the semi-transparent grid of 25 × 25-pixel red squares on your application when running in debug mode. These squares are contained within a padding of 24 pixels around the page and are offset by 12 pixels between one another — the magic combo for Windows Phone design. The grid enables you to quickly and easily identify any alignment issues on the page.
  MetroGridHelper
- Field and value pairs should either be presented in two left aligned columns, or with the tile above the content as in the contact detail page in the people hub.
image    image   image

2- Element Spacing

Spacing between elements should be consistent both horizontally and vertically. It is recommended that elements are spaced a multiple or subdivision of 12px apart in order to follow the design grid.
image image imageimage

3- Control Feedback on Tap

- When using standard controls such as Buttons, List Items .. etc, should use the standard Windows Phone tilt effect.
- No background, foreground, or border color changes
- Other controls, no animation or color changes are permitted
- Color change of any description is not permitted for touch feedback

4- Lists

- Tilt animations must be used to indicate a list item has been pressed.
image      image
- List items should not have a selected state, unless in a picker.
- Use strong consistent typefaces across the app, make list item text at least 12 pixels in height and make it ease for touch, and make sure that the text is legible from all angles and sizes.
Backgrounds
- Backgrounds are discouraged. They are allowed for brand reasons and to support contrast. Instead, use any accent colors on the text foreground
Layouts
- Use text size and color to establish list item hierarchy. See the Photoshop templates for a fullrangeof list templates.
Enhancements
- List enhancements should not be used unless they are distinct from one another, such as in a menu. A rule of thumb is that Icons in a circle represent actions and those without are for indication.
image
Scrollable Content
-If you have scrollable content on your page, you should put 95px bottom padding at the end of your content. This way the content doesn’t reach all the way to the very bottom of the page.
For example, here is a simple page that is slightly higher than the visible area:
image
- if the user scrolls to the end of the page, the rubber band effect will come into view and the content will be pulled slightly above the bottom. But once the scroll is released, the content bounces back down to the edge of the screen once again.
image
- While it doesn’t poke your eyes and it generally works OK, having content stretched all the way to the bottom is not ideal. The quick fix for this is adding 95px margin to the bottom to move your content away from the bottom – regardless if it is bottom of the phone chrome or the application bar. The final result is more pleasing to the eye.
image
- You can see the same padding in effect if you check the profile and history pages on any of your contact. It is also present on the new appointment page in the Calendar app and in the Internet Explorer’s settings page. Speaking of settings, scroll down to the bottom in the Settings application.

5- Pivot Controls

Pivot Pages
- All pivot controls should have at least two pages in them
Controls not permitted in Pivot
- Toggle switches
- Sliders
- Maps controls – unless they are static (pinch/zoom/pan are disable etc.)
- Browser controls - unless they are static (pinch/zoom/pan are disable etc.)
Gesture Competition
- Controls that provide a horizontally scrollable area or take a horizontal swipe gesture are not permitted in the pivot control as the horizontal swipe gesture is reserved for changing pivot pages.
            image
Empty Pivot Pages
- If a pivot page relies upon user interaction in order to populate it with content, then placeholder text/image should be included that indicates to the user that content is outstanding. For example, if there are no items displayed on an ‘Unread email’ pivot page, then the page should not be removed, it should simply state that no content is available at this time.
image
for more information check: Pivot control design guidelines for Windows Phone

6- Panorama Controls

Controls not permitted in Panorama
- Toggle switches
- Sliders
- Maps controls – unless they are static (pinch/zoom/pan are disable etc.)
- Browser controls - unless they are static (pinch/zoom/pan are disable etc.)
Application Bar
- Common actions such as refresh, search and settings should be placed in an application bar.
- The options available in the application bar can change contextually with the panorama pane.
- Floating buttons on the panorama should be avoided or be kept to minimum
Gesture Competition
- Controls that provide a horizontally scrollable area or take a horizontal swipe gesture are not permitted in the panorama control as the horizontal swipe gesture is reserved for changing panorama pages.
Scrollable Panes
- Panorama panes should either scroll vertically or horizontally. Not both.
image
- All panorama panes should not scroll vertically. If this is the case a pivot control is probably more suitable.
- Using a variety of panorama panes (vertical and horizontal) will improve the overall user experience and make the panorama easier to navigate.
Navigation
- Floating buttons should be avoided. If necessary provide a navigation section to allow users to dig deeper into the content.
- The native Pictures and Music & Videos panorama have good examples of this. Generic tasks should be placed in the panorama app bar.
  image
Interactive Content
- Minimize the use interactive content on the panorama (forms, search boxes etc.).
- Panorama controls should be used to entice the user to explore (i.e. overview about the app).
- Use only a small set of tasks at this level that are fresh, dynamic and compelling.
- The panorama control should not be your entire application.
Number of Panes
- A maximum of five panes are recommended. Any more than five and they will be difficult to navigate and performance will take a hit.
Background
- Panorama controls should have a background. These can be textures brand elements, graphics, photos.
- Ideally they should be engaging and where possible contextual.
Title
- The panorama title should be animated.
- The rate of motion for the panorama title is that it should be slow relative to the topmost content layer, and slower than the background art (if applicable).
Section Titles
- The font size should be larger than the corresponding content.Photoshop templates are available tofacilitate panorama design.
for more information check: Panorama design guidelines for Windows Phone

7- Headings

- Headings should be left aligned, and should not have backgrounds, borders, underline, or any other kind of decoration.
- The exception to this is panorama pane titles, which may use corporate branding.
- Also see text guidance section of this blog.

8- Buttons

Placement
- Wherever possible, buttons should be placed in the application bar.
Exceptions to this include:
image
- Panoramas - where guidance Error! Reference source not found may apply.
- Dialogs and settings where more verbose actions may be needed.
- Quick actions (for example call history on a Windows Phone)
  image
Close Buttons
- Windows Phone applications do not need close buttons, as closing actions are handled by the hardware back button.
Back Buttons
- Back buttons are not permitted anywhere in Windows Phone. The user will make use of the hardware back button on the device.
Home Buttons
- Home buttons should be avoided as they can prove problematic to the Windows Phone navigation model. This becomes most evident if a user actions both the home button and the hardware ‘back’ button to navigate which may result in a loop effect.

9- Pickers

- The standard pickers should be used for picking the date and/or time, or for choosing a letter of the alphabet.
- Should a nonstandard picker be required, these should follow the look and feel of the ringtone picker in the Settings app on the device.

10- Start Tiles

Primary Tiles
- Start tiles should not have rounded corners or three dimensional elements to them. They should fit in with the look and feel of other items in the Start menu.
        image
- Ensure standard tile templates are used
- The app logo should appear in the space dedicated to it in the template
- Logos should not be duplicated on the tile
- If the name of the app is included as part of the tile image, then the app name should be removed from the manifest to avoid it appearing twice
- Avoid including localized text in image files for tiles
- Start tiles should avoid having a full black (#000000) or full white (#FFFFFF) background, as these will not render properly in the dark or light themes.
Avoid using relative time stamps or dates (eg. ‘two hours ago’). This is a static statement and will become inaccurate as time progresses. Instead, use an absolute date or time (eg. ’14:00’)
Secondary Tiles
- Secondary tiles should not link to static content
- Secondary tiles should not interact with the app (eg. ‘skip to next track’)
- Good examples include pinning a news category that updates regularly or a specific stock with an updating share price
- Avoid pinning to content that may not be available to users when they access the app at a later date (eg. a specific news article that is no longer current and has been replaced)
Wide Tiles
- The wide tile should only be used to display new, interesting content and notifications which are updated frequently (at least weekly).
- Wide tiles must be live.
   image
for more information check: Tile design guidelines for Windows Phone

11- Browser Controls

- Browser controls should not be embedded in any pages in an app. The user should always be taken off to Internet Explorer on the device.
- Links that navigate a user away from the app should clearly state that this will happen.
Exceptions
- Where the user is being taken to a single page for authentication (such as with Facebook or Twitter), and no Xauth or similar API is available for the authentication controls to be implemented in Silverlight controls, the authentication can be performed in an embedded web browser control in the application.

12- Dialog Boxes

- Use the standard Windows Phone Dialog box. Single buttons should be left aligned and multiple buttons centre aligned.
- Avoid creating custom dialog boxes – If this is unavoidable ensure the behavior of the custom control mimics that of the native dialog box.
         image
- The Windows Phone toolkit also has a dialog control that allows for a greater degree of customization.
for more information check: http://msdn.microsoft.com/en-US/enus/library/microsoft.xna.framework.gamerservices.guide.beginshowmessagebox.aspx

13- Contrast

- There must be sufficient contrast between the background and foreground of controls on the page.
- This is particularly important for panoramas, where the background image can often interfere with the legibility of text. If this happens, either replace the image, or apply a semi-transparent black (or grey) layer over the image.

14- Text

Text Case
- Titles in Windows Phone should always be lowercase with the exception of section titles which should be all uppercase. If brand guidelines insist on a different case, then ensure that the use of the case is consistent across the app.
Custom/Brand Typefaces
- Custom or brand typefaces can be used in moderation in the application, though care should be taken. Custom typefaces can be used for page titles or panorama section titles. Segoe WP should be used everywhere else.
- Be careful if the typeface closely resembles Segoe WP, such as Arial or Helvetica, as mixing these with Segoe can look odd.

15- Images

- Images used within the application on backgrounds or UI elements should properly fit the application.
- Aspect ratios should be respected, images should not be pixilated or smudged as a result of scaling, and images with transparency should have proper anti-aliasing to ensure they display properly on different colored backgrounds.
- For most apps, we recommend that you include only WXGA assets. WXGA assets have the highest quality, and they automatically scale to work well for other resolutions. Multi-resolution apps for Windows Phone 8
        image

16- Icons

Metaphors
- Don’t mix metaphors. Users recognize certain icons to mean certain things, either because they are used elsewhere in the device or because they are commonly associated with something else. For example:
 image
- If no icon exists for the metaphor you are trying to convey, create one. Do not repurpose existing icons.
Look and Feel
- Icons should respect the Windows Phone design style look and feel – simple, one color, and two dimensional.

17- Touch Targets

- Ensure your application is optimized for touch.
- Minimum font size is 15pt
- Recommended touch target size is 9mm
   UX_Interactions_SmallAssets_03
- Minimum touch target size is 7mm
   UX_Interactions_MinHitTarget
- Minimum spacing between elements is 2mm
  UX_Interactions_SmallAssets_02
- Visual size is 60-100% of the touch target size 
- Provide feedback when an item is touched
            image

18- Typos

- The app should not have any spelling mistakes.
- Copy that is spelt incorrectly looks bad and could negatively impact the brand perception.

19- Theme

- The application should either respect the theme and accent color changes of the device, or should have a fixed theme that is not affected by such changes.
- All elements should be visible and have appropriate levels of contrast regardless of theme.

20-  Splash Screen

- Provide different splash screens for the different resolutions
         image

21- The Hardware Back Button

- The hardware back button should always allow a user to complete one of the following tasks:
      1. Dismiss temporary UI elements such as dialogs, keyboards (SIP) or pick lists.
      2. Move backwards through the back stack.
- The back button must not be altered under any circumstances. This includes its behavior when implementing secondary tiles (please refer to section 4.1.22)

22- Secondary Tiles (deep linking)

- Secondary tiles are designed to launch the user into specific areas of the application. They are designed to allow quick and easy access to content and are generally not used as an entry point for exploration.
- Good examples of secondary tiles can be found on the device itself. For example, a pinned album from music and video will play the album when tapped. The tile serves as a specific purpose – go to the album and play it.
- Users can also pin people to the Start screen. Tapping on one of these tiles takes the user into the contact card pivot where they can see all the information and tasks related to that specific contact.
- Pressing the hardware back button returns the user to the Start screen.
Pinning
- The Pin icon should be used in the application bar to indicate that an item/section of the app can be pinned to the start screen. Please do not repurpose existing icons.
- Pinning can also be activated by using the touch and hold context menu – this is available in the Windows Phone toolkit.
- The pinning action should always be initiated by the user, or permission from the user should be sought. Do not pin items to a user’s Start screen without requesting their permission first.
Hardware Back Button
When a user launches an application by tapping on a secondary tile, pressing the hardware back button should exit the application (i.e. return to the Start screen). The behavior of the hardware back button should not be altered in any way.

23- Lock Screen

- Background images should contain minimal text to avoid conflict with on-screen messages
- Background images should be simple – ‘busy’ images affects the legibility of on-screen messages and notifications
- Logos should be kept small to avoid competition with date, time and notifications
- If text is included, it should related directly with the image
- The visual focus of the lock screen should be the image, not the logo or text
            image         image

24- Lens Design 

- Apps should support a left-pointing arrow icon to indicate that additional photos are available
- The animation for ‘Save’ and ‘Capture’ should be consistent
- Tap-to-tap capture and the camera hardware button should be supported
- Half-press to focus should be supported
- Focus brackets should function as they do for the basic camera where relevant
- Capture and confirm apps should use a consistent set of icons (‘save’ and ‘delete’) along with animation for confirming and cancelling the storage of the item.
- ‘Cancel’ and ‘save’ should return the user to the viewfinder. These icons are included with the Windows Phone SDK.
Rich Media Open Link
- The open link should launch an experience tailored to viewing or editing a selected item and not action a generic app launch point
- Displaying branding elements on items stored in the camera roll should be avoided – users should be able to share and edit these items without visual distractions
for more information check: Lens design guidelines for Windows Phone

25- Page Transitions

- Animations should be implemented when moving between pages. This effect is available from the Silverlight for Windows Phone Toolkit.
             image
- couple of page transitions are included in the Silverlight for Windows Phone Toolkit:
  • Turnstile - To transition between contextually different areas
  • Swivel - Partial and transient UI
  • Slide - Staying in context while showing a set of options, and No forward navigation
  • Tilt – Natural feedback a control is pressed
- Use a bar to indicate progress
  • Just as you use tilt animation to indicate to the user that their tap has taken effect, progress bars enable you to communicate that a process is being executed. This removes doubt for the user about whether the application is functioning properly. Two types of progress bars can be used: determinate and indeterminate.
    Determinate Progress Bar
    Determinate progress bar.
          Indeterminate Progress Bar
          Indeterminate progress bar.
  • A determinate progress bar is used to communicate the percentage of completion, such as the percentage of bytes copied out of the total number of bytes. An indeterminate progress bar is much more common and is particularly useful when you don’t know the length of the process, such as when calling a Web service and waiting for a response.

26- Language and Tone

- Do not use computer jargon, hexadecimal error codes, or text that assumes computer knowledge.
- Use an authentic and clear tone and reflect the language that is used by the audience.
- Use friendly, light hearted and empathic tones. Never use angry or mechanical tones in the application.

In Conclusion

These are just recommendations from different cases studies that are usually application specific. So, feel free to do what is right for your application taking into consideration some success factions like:
- Deliver the best experience on any mobile platform is to design the app for the platform and its accompanying usage patterns.
- The first step in building a compelling Windows Phone UI-compliant application is to spend time using the apps that ship with the OS. This will familiarize you with Windows Phone’s unique set of controls and design paradigms.

References:

1)http://blogs.msdn.com/b/africaapps/archive/2014/03/08/ux-guidelines-for-windows-phone-8.aspx
2)http://msdn.microsoft.com/library/windowsphone/develop/fa00461b-abe1-41d1-be87-0b0fe3d3389d(v=vs.105).aspx

Have a nice day by