Format:
Recent snippets matching tags of Windows Phone
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);
147 Views
no comments
public partial class MyDataContext : System.Data.Linq.DataContext { public void OnCreated() { if (!this.DatabaseExists()) MoveDatabase("MyDatabase.sdf"); } public static void MoveDatabase(string name) {
241 Views
no comments
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");
142 Views
no comments
// 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() {
118 Views
no comments
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); } }
172 Views
no comments
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);
123 Views
no comments
// // 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. //
860 Views
no comments
using System; using System.Collections; using System.Collections.Generic; namespace Core { /// <summary> /// Validation Routines /// </summary> /// <remarks>
509 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
