Syntax Error

Code samples and hints

Wireshark: Analyse and browse network traffic

Wireshark

Wireshark® is a network protocol analyzer. It lets you capture and interactively browse the traffic running on a computer network. It has a rich and powerful feature set and is world's most popular tool of its kind. It runs on most computing platforms including Windows, OS X, Linux, and UNIX.

http://www.wireshark.org/

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

SharpSerializer - serializer for .NET Framework

SharpSerializer is an open source serializer for .NET Framework and .NET Compact Framework. It's purpose is simple and quick object serialization from A to B, without security considerations. SharpSerializer can a lot more than the built-in XMLSerializer and does it simpler. It can serialize to XML such types as a generic dictionary, multidimensional array, nested array/array of array, polymorphic/inherited objects. 

http://www.sharpserializer.com

Load from File

var ss = new Polenter.Serialization.SharpSerializer();
 var store = (MyDataType)ss.Deserialize(filePath);

Save to File

var ss = new Polenter.Serialization.SharpSerializer();
 ss.Serialize(filePath, objectToSerialize);

 

Fixing Stuck Explorer Items

Fixing Stuck Explorer Items
During my testing, I figured out that Windows Explorer always seems to use the same exact filename to store the pinned/recent items: 1B4DD67F29CB1962.AUTOMATICDESTINATIONS-MS
So you can try this command, which will wipe out all the pinned and recent items for Windows Explorer only:

1. open %appdata%Microsoft\Windows\Recent\AutomaticDestinations

2. delete 1B4DD67F29CB1962.AUTOMATICDESTINATIONS-MS

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 

WPF – Styles & Templates (Gratis-Booklet für Einsteiger)

WPF – Styles & Templates (Gratis-Booklet für Einsteiger)

WPF bietet viele neue Möglichkeiten zur Gestaltung von Controls und deren Anbindung an Datenbestände. Für Einsteiger und Gelegenheitsanwender ist es jedoch immer recht schwierig, sich die richtigen Mittel aus der grossen Palette herauszusuchen und korrekt anzuwenden.

Das vorliegende Booklet beschäftigt sich mit ausgewählten, in WPF zentralen Themen und soll als Nachschlagewerk betrachtet werden. Das Booklet richtet sich somit an Entwickler, die sich neu mit WPF beschäftigen und solche, die noch nicht regelmässig damit gearbeitet haben.

Es handelt sich nicht um eine vollständige Abhandlung aller Möglichkeiten und Lösungswege der jeweiligen Themen, sondern beschränkt sich auf die im Normalfall relevanten Bereiche.

Ausserdem werden in diesem Booklet die weiterführenden, in realen Projekten unerlässlichen Konzepte wie z.B. Model-View-ViewModel (MVVM) und Dependency Injection mit Rücksicht auf die Einfachheit der Codebeispiele nicht einbezogen.
 

Kapitel

  • Übersicht
  • Ressourcen
    • Überblick
    • Statische und dynamische Ressourcen
    • Application
    • Window & Page
    • Controls
    • ResourceDictionary
    • Themes
    • MSBuild Resource-Dateien
    • MSBuild Page-Dateien
    • Lose Dateien
  • Style
    • Überblick
    • Vererbung
    • Styles als Ressourcen
    • Direkte Deklaration
  • Template
    • Überblick
    • ControlTemplate
    • DataTemplate
    • ItemsPanelTemplate
  • Databinding
    • Überblick
    • ElementName-Binding
    • Source-Binding
    • DataContext-Binding
    • RelativeSource
    • TemplateBinding
    • UpdateSourceTrigger
    • Mode
    • Validierung
    • Converter
  • Trigger
  • Glossar

 

Download
WPF - Styles & Templates.pdf (1.07 mb)