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
public static TResult GetFirstResult<TSource, TResult>( | |
IEnumerable<TSource> source, Func<TSource, TResult> invokeAction) | |
{ | |
if (source== null) | |
{ | |
throw new ArgumentNullException("source"); | |
} | |
if (invokeAction== null) |
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
public static class StringExtensions | |
{ | |
public static readonly string CHAR_UNICODE_HEX_FORMAT = "{0:x4}"; | |
public static readonly string CHAR_UNICODE_PREFIX = "&#{0};"; | |
public static string EncodeUnicodeChars(this string srcString) | |
{ | |
if (srcString == null) | |
{ |
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
public static readonly string CHAR_UNICODE_FORMAT = "&#{0};"; | |
public static string EncodeUnicodeChars(this string srcString) | |
{ | |
if (srcString == null) | |
{ | |
throw new ArgumentNullException("srcString"); | |
} | |
return srcString.Aggregate(new StringBuilder(), |
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
<ListBox Name="lstPosts" Margin="0,10,0,0" ItemsSource="{Binding SelectedSite.Posts}" Grid.Row="2" SelectedItem="{Binding SelectedPost, Mode=TwoWay}"> | |
<ListBox.ItemTemplate> | |
<DataTemplate> | |
<Border BorderBrush="{StaticResource PhoneForegroundBrush}" CornerRadius="20" BorderThickness="0 0 0 2" Margin="0 2" > | |
<TextBlock Text="{Binding Title}" TextWrapping="Wrap" Style="{StaticResource PhoneTextLargeStyle}" Width="{Binding ElementName=lstPosts, Path=ActualWidth}"/> | |
</Border> | |
</DataTemplate> |
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
browser.NavigateToString(htmlString); |
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
public static class StringExtensions | |
{ | |
public static readonly string CHAR_UNICODE_FORMAT = "&#{0};"; | |
public static readonly int ASCII_INDEX = 127; | |
//Dirty fix for WP7 browser | |
public static string EncodeUnicodeChars(this string srcString) | |
{ | |
if (srcString == null) |
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
<controlex:PageBase | |
xmlns:mybehaviors="clr-namespace:RStein.PosterousReader.WP.Behaviors" | |
.... | |
.... | |
> | |
..... | |
<phone:WebBrowser Name="wbPostBody" mybehaviors:WebBrowserNavigateBehavior.NavigateText="{Binding SelectedPost.Body}"> |
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.Net; | |
using System.Windows; | |
using System.Windows.Controls; | |
using System.Windows.Documents; | |
using System.Windows.Ink; | |
using System.Windows.Input; | |
using System.Windows.Media; | |
using System.Windows.Media.Animation; | |
using System.Windows.Shapes; |
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
// Code to execute when the application is launching (eg, from Start) | |
// This code will not execute when the application is reactivated | |
private void Application_Launching(object sender, LaunchingEventArgs e) | |
{ | |
} | |
// Code to execute when the application is activated (brought to foreground) | |
// This code will not execute when the application is first launched | |
private void Application_Activated(object sender, ActivatedEventArgs e) | |
{ |
OlderNewer