View Window1.xaml
This file contains 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
<Window x:Class="WpfApplication1.Window1" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
Title="Popup Tester" Height="300" Width="300"> | |
<Window.Resources> | |
<Style TargetType="{x:Type TextBox}"> | |
<Setter Property="Margin" Value="10" /> | |
<EventSetter Event="GotKeyboardFocus" Handler="run_MouseEnter" /> | |
</Style> |
View ImageResizer.cs
This file contains 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.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
namespace ImageTools | |
{ | |
public class ImageResizer |
View ImageResizer.cs
This file contains 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.Drawing; | |
using System.Drawing.Drawing2D; | |
using System.Drawing.Imaging; | |
using System.IO; | |
using System.Linq; | |
namespace Boo | |
{ | |
public class ImageResizer |
View TokenReplacementMasterPage.cs
This file contains 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.Text; | |
using System.IO; | |
using System.Web.UI; | |
namespace Boo | |
{ | |
public class TokenReplacementMasterPage : System.Web.UI.MasterPage | |
{ | |
protected override void Render(HtmlTextWriter writer) |
View gist:201768
This file contains 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 void ClearControlValues( | |
Control parentCtrl, bool recursive) | |
{ | |
ClearControlValues(parentCtrl, recursive, | |
new List<Control>(0)); | |
} | |
public static void ClearControlValues( | |
Control parentCtrl, bool recursive, | |
List<Control> ignoreControls) |
View gist:201827
This file contains 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
protected string MySelectedValue | |
{ | |
get | |
{ | |
return (ViewState["MySelectedValue"] == null) | |
? null : ViewState["MySelectedValue"].ToString(); | |
} | |
set | |
{ | |
ViewState["MySelectedValue"] = value; |
View SuperValidator.cs
This file contains 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.Collections.Generic; | |
using System.ComponentModel; | |
using System.Drawing; | |
using System.Text.RegularExpressions; | |
using System.Windows.Forms; | |
namespace Controls | |
{ | |
[ProvideProperty("Required", typeof(Control))] |
View MainPage.xaml
This file contains 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
<UserControl x:Class="ResourceDictionaryHeadache.MainPage" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
mc:Ignorable="d" d:DesignWidth="640" d:DesignHeight="480"> | |
<UserControl.Resources> | |
<ResourceDictionary Source="/SampleData.xaml" /> | |
</UserControl.Resources> | |
<Grid x:Name="LayoutRoot"> | |
<ListBox HorizontalAlignment="Stretch" |
View SerializationInfoHelper.cs
This file contains 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.Collections.Generic; | |
using System.Runtime.Serialization; | |
namespace Helpers | |
{ | |
public class SerializationInfoHelper | |
{ | |
private readonly SerializationInfo _info; | |
private bool _enumerated = false; |
OlderNewer