CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of Windows Phone
C#
public class HandleTheme
{
    // light
    public static string GetLightUrl(DependencyObject obj)
    {
        return (string)obj.GetValue(LightUrlProperty);
    }
    public static void SetLightUrl(DependencyObject obj, string value)
    {
        obj.SetValue(LightUrlProperty, value);
by Jerry Nixon   November 18, 2011 @ 9:36am
147 Views
no comments
 
C#
public partial class MyDataContext : System.Data.Linq.DataContext
{
    public void OnCreated()
    {
        if (!this.DatabaseExists())
            MoveDatabase("MyDatabase.sdf");
    }
 
    public static void MoveDatabase(string name)
    {
by Jerry Nixon   November 10, 2011 @ 10:13am
241 Views
no comments
 
C#
void DoQuery()
{
    // Register for the LoadCompleted event.
    var _Data = new DataServiceCollection<CityCrime>();
    _Data.LoadCompleted += _Data_LoadCompleted;
 
    // start the servery query
    var _Query = GetContext().CityCrime
        .Where(x => x.State == "Colorado")
        .Where(x => x.City == "Denver");
by Jerry Nixon   November 07, 2011 @ 3:56pm
142 Views
no comments
 
C#
// https://datamarket.azure.com/
private const string AZUREDATAACCOUNT = "Your Customer ID";
private const string AZUREDATAKEY = "Your Account Key";
private const string AZUREDATAURL = 
    "https://api.datamarket.azure.com/Data.ashx/data.gov/Crimes/";
 
// create a new context to the odata feed
private static Mango.Sample.AzureMarket
    .CityCrimeService.datagovCrimesContainer GetContext()
{
by Jerry Nixon   November 07, 2011 @ 3:28pm
118 Views
no comments
 
C#
public void SaveData(string path, object data)
{
    var _Store = IsolatedStorageFile.GetUserStoreForApplication();
    using (var _Stream
        = new IsolatedStorageFileStream(path, FileMode.Create, _Store))
    {
        var _Serializer = new XmlSerializer(data.GetType());
        _Serializer.Serialize(_Stream, data);
    }
}
by Jerry Nixon   November 07, 2011 @ 1:40pm
172 Views
no comments
 
C#
var _Key = "MyUniqueKey";
 
// persist data to the dictionary
var _DataToStore = "Store this string!";
IsolatedStorageSettings
    .ApplicationSettings.Add(_Key, _DataToStore);
 
// test presence in store
var _BoolResult = IsolatedStorageSettings
    .ApplicationSettings.Contains(_Key);
by Jerry Nixon   November 07, 2011 @ 1:37pm
123 Views
no comments
 
C#
//
// Besides some IoC container hookup and the plumbing for
// EventAggregator and Azure ServiceBus this is what an
// Event Driven Architecture application suited for 
// Continuous Client may look like.
//
// This was not done in an MVVM pattern as it would just
// introduce complexity for people unfamiliar. I wanted to
// focus on the Event Driven Architecture.
//
by Kelly Sommers   June 04, 2011 @ 5:55pm
860 Views
no comments
 
C#
using System;
using System.Collections;
using System.Collections.Generic;
 
namespace Core
{
    /// <summary>
    /// Validation Routines
    /// </summary>
    /// <remarks>
by rickrat   November 24, 2010 @ 9:56pm
509 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate