This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Windows; | |
using Microsoft.Phone.Controls; | |
namespace Sample.Controls { | |
public class MTLonglistselector : LongListSelector { | |
public MTLonglistselector() { | |
ItemRealized += OnItemRealized; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[JsonProperty(PropertyName = "id")] | |
public long Id { get; set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
using System.Windows.Controls; | |
namespace MeituanWP8.Controls.CustomControl { | |
public abstract class DataTemplateSelector : ContentControl { | |
public virtual DataTemplate SelectTemplate(object item, DependencyObject container) { | |
return null; | |
} | |
protected override void OnContentChanged(object oldContent, object newContent) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte[] result = new byte[intArray.Length * sizeof(int)]; | |
Buffer.BlockCopy(intArray, 0, result, 0, result.Length); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var reader = new DataReader(myMemoryStream.GetInputStreamAt(0)); | |
var bytes = new byte[myMemoryStream.Size]; | |
await reader.LoadAsync((uint)myMemoryStream.Size); | |
reader.ReadBytes(bytes); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Interactivity; | |
namespace RenRen.WPOfficial.Client.Shared.Behavior | |
{ | |
public class HideWhenTextEmpty : Behavior<TextBlock> | |
{ | |
protected override void OnAttached() | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Microsoft.Phone.Controls; | |
using System; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Controls.Primitives; | |
using System.Diagnostics; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace Ocell.Controls |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Implements multipart/form-data POST in C# http://www.ietf.org/rfc/rfc2388.txt | |
// http://www.briangrinstead.com/blog/multipart-form-post-in-c | |
public static class FormUpload | |
{ | |
private static readonly Encoding encoding = Encoding.UTF8; | |
public static HttpWebResponse MultipartFormDataPost(string postUrl, string userAgent, Dictionary<string, object> postParameters) | |
{ | |
string formDataBoundary = String.Format("----------{0:N}", Guid.NewGuid()); | |
string contentType = "multipart/form-data; boundary=" + formDataBoundary; |
NewerOlder