Syntax Error

Code samples and hints

Windows 10 Mobile Insider Preview: Phone is trapped in a reboot loop

If you have the Problem, that your Phone is trapped in a reboot loop, try this steps to recover your OS.

1) Right on begin of a (re)boot where the Nokia logo appears: Volume Down until the exclamation mark appears
2) Press Volume Up once
3) Press Volume Down once
4) Press Power once
5) Press Volume Down again

Then the Phone will reboot again and shortly after this, the gears will show up and a fresh installation is starting.
If you do a mistake in the button order, just start again with step 1.

‘Cannot register duplicate name ‘XXX’ in this scope’ in VS 2010

If you have the problem, that Visual Studio 2010 complains ‘Cannot register duplicate name ‘XXX’ in this scope’, check if you have Resources with a x:Name insted of x:Key-Name:

<SolidColorBrush x:Name="NonWorkingResourceName" Color="Red" />
<SolidColorBrush x:Key="WorkingResourceName" Color="Blue" />

Replace x:Name with x:Key and everything is ok.

Read the full post here ...

Caliburn.Micro – Introduction

Caliburn.Micro – Introduction

Caliburn.Micro is a lightweight and small, yet powerful framework for developing rich WPF, Silverlight or Windows Phone applications. Caliburn.Micro has only a single dependency to the System.Windows.Interactivity library. Due to its small footprint of only 75 k and approximately 2700 lines of code it is not only lightning fast in startup and execution time but also easy to understand. The framework offers pattern guidance for the following well established design patterns:

  • Model – View – ViewModel (MVVM)
  • Model – View – Presenter (MVP)
  • Model – View – Controller (MVC)

Rob Eisenberg (www.robeisenberg.com) and Marco Amendola (marcoamendola.wordpress.com) are actively maintaining the project and taking care of the documentation. The documentation is really thorough and offers tips and tricks how to avoid the common pitfalls. The project is released under a developer and company friendly license namely the MIT License.

http://www.bbv.ch/?p=450&option=com_wordpress&Itemid=173

Determine Light or Dark Theme with WP7

Determine Light or Dark Theme with WP7

Visibility v = (Visibility)Resources["PhoneLightThemeVisibility"];
  
 if (v == System.Windows.Visibility.Visible)
 {
     ImageBrush ib = new ImageBrush();
     Uri u = new Uri("PanoramaBack2.png", UriKind.Relative);
     ib.ImageSource = new System.Windows.Media.Imaging.BitmapImage(u);
     PanoramaControl.Background = ib;
 }

Any time you use a background image you can check the
PhoneLightThemeVisibility resource and switch between different versions of the
image to provide the best experience with either Black or White text.

http://mobileworld.appamundi.com/blogs/peterfoot/archive/2010/09/17/determine-light-or-dark-theme-with-wp7-rtm.aspx 

Individueller Splashscreen für Windows Phone 7 Anwendungen

Individueller Splashscreen für Windows Phone 7 Anwendungen

Um so einen Bildschirm in seine eigene Windows Phone 7 Anwendung zu integrieren, sind nicht wirklich viele Schritte notwendig. Man benötigt lediglich ein neues JPEG oder PNG in der Größe 480×800 Pixel.

Wichtig ist, das man das Bild in “splashscreenimage.jpg” umbenennt.
Zusätzlich muss das Bild als Content eingebunden werden. Standardmäßig wird es als Ressource eingebunden

http://the-oliver.com/2010/06/04/windows-phone-7z-splashscreen/

Creating Windows Phone 7 Application and Marketplace Icons

Creating Windows Phone 7 Application and Marketplace Icons

http://www.shazaml.com/archives/summary-of-windows-phone-7-application-certification-requirements

Application Iconography

Required Icons in the XAP Package

Pixels

File Type

Application Icon

62 x 62

PNG

Application Tile Image

173 x 173

PNG

Windows Phone Marketplace Iconography

Icon

Size (Pixels)

File Type

Device application icon for Windows Phone Marketplace catalog (small)

99 x 99

PNG

Device application icon for Windows Phone Marketplace catalog (large)

173 x 173

 

Desktop application icon for Windows Phone Marketplace catalog

200 x 200

PNG

Application bar icon pack for Windows Phone 7

Application bar icon pack for Windows Phone 7

This package contains a set of 64 app bar icons that you can use when developing applications for Windows Phone. In addition to the 64 icons in PNG format (32 dark and 32 light), this package also contains vector versions.

C:\Program Files\Microsoft SDKs\Windows phone\v7.0\Icons

On-Screen Keyboard with Windows Phone 7

On-Screen Keyboard with Windows Phone 7

Working with an on-screen keyboard has never been easier with a windows phone. It’s very context sensitive so when you click on a text box it automatically zooms in to the text box and opens up the on-screen keyboard unit. 

When you place a TextBox control on-screen and it has focus a Software keyboard for the touchscreen will pop-up. It’s important to be able to customize that keyboard to the types of input the user will be placing in that textbox with the Windows Phone, you can specify the input scope, which determines the keyboard layout for the software input panel (SIP). This provides the user with easy access to the expected input characters based on the application context.

Here are some of the common SIP layouts and the associated values that you specify in XAML or in application code.

Blog-Source

 

Starting Internet Explorer from a Windows Phone (WP7) Application

Starting Internet Explorer from a Windows Phone (WP7) Application 

using Microsoft.Phone.Tasks; namespace WindowsPhoneLaunchExternal
{
    public partial class MainPage : PhoneApplicationPage
    {
        private void hyperlinkbuttonExternal_Click(object sender, RoutedEventArgs e)
        {
            WebBrowserTask task = new WebBrowserTask();
            task.URL = textboxUrl.Text;
            task.Show();
        }
    }
}

Adding an Application Bar to your Windows Phone 7 application

Adding an Application Bar to your Windows Phone 7 application

http://www.nickharris.net/2010/04/adding-an-application-bar-to-your-windows-phone-7-application/

Icon Buttons UI Best Practices

  1. Icon images should use a white foreground on a transparent background using an alpha channel. The Application Bar will colorize the icon according to the current style settings and colored icons can cause this effect to display unpredictably.
  2. The circle displayed on each Icon Button is drawn by the Application Bar and should not be included in the source image.
  3. Icon images should be 48 x 48 pixels in size. The white foreground graphic for the button should fit in a 26 x 26 area square in the center of the image so that it does not overlap the circle.
  4. Do not use an Icon Button for a back button that navigates backwards in the page stack. Windows Phones are required to have a dedicated hardware back button that should always be used for backward navigation.
  5. Use Icon Buttons for the primary, most-used actions in your menu. Some actions are difficult to convey  with an icon. If this is the case, you should using a Menu Item instead.
  6. Choose icons that have clear meanings when the Application Bar is rotated. The Application Bar automatically handles changes in screen orientation. When the device is in a landscape orientation, the menu is displayed vertically on the side of the screen. The icon buttons are rotated so that they appear upright to the user, but the order of the icons in the list is not changed. It is possible for icon meanings to be confused when this occurs, particularly if two of the icons are mirror images of each other along the Y axis.

Blog-Source