My name is Edward Tanguay. I'm an American software and web developer living and working in Berlin, Germany.
yesterday: Inspiring ted talk: Sugata Mitra: The child-driven education: "any teacher who can be replaced by a machine, should be": http://is.gd/eZRvi.
yesterday: Always so painful to look up the German article of a borrowed IT word: der Framework or das Framework? LEO won't tell me: http://is.gd/eZMeU.
yesterday: I know what podcast I'm listening to tomorrow on my way to work: John Resig on technometria: http://is.gd/eZJfq.
yesterday: C# CODE EXAMPLE: Extension method to sort a generic collection of objects: http://is.gd/eZG6n.
yesterday: C# CODE EXAMPLE: A simple class that represents a matching quiz item: http://is.gd/eZFZV.
yesterday: After-work 13K, two 5Ks under sub-four marathon pace: 23:27, 27:27, legs feel great: http://tanguay.info/run.
2 days ago: 6 yr old daughter's last 2 questions before falling asleep tonight: 1) Why are there humans? 2) Is there anything that doesn't have a name?
3 days ago: If you are a developer in Berlin and need to improve your English, I'm looking for groups to teach after work: http://tanguay.info/itenglish.
3 days ago: As far as I'm concerned, the singularity is already here, every time I wake up twitter tells me something amazing was created while I slept.
3 days ago: We're not suffering from information overload, we're suffering from faulty filtering.
3 days ago: Classic literature for free as nicely formatted 1-page or 2-page PDF downloads: http://www.planetebook.com/free-ebooks.asp.
WPF CODE EXAMPLE created on Saturday, February 06, 2010 permalink
How to use a WPF FileDialog to read in a text file
This example shows how you can allow the user to click on a button and choose a text file to view the contents of the file in a scrollable box on the screen.
XAML:
<Window x:Class="TestFileDialog2343.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="300" Width="350">
    <StackPanel Margin="10" HorizontalAlignment="Left">
        <StackPanel HorizontalAlignment="Left">
            <Button Content="Load File"
                Click="Button_LoadFile_Click"
                Margin="0 0 0 10"/>
        </StackPanel>
        <ScrollViewer
            Width="300"
            Height="200">
            <TextBox x:Name="TextFileContent"
                 TextWrapping="Wrap"/>
        </ScrollViewer>
    </StackPanel>
</Window>

Code Behind:
using System.Windows;
using Microsoft.Win32;
using System.Text;
using System.IO;
using System;

namespace TestFileDialog2343
{
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
        }

        private void Button_LoadFile_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();
            dlg.DefaultExt = ".txt";
            dlg.InitialDirectory = @"C:test";
            dlg.Filter = "Text documents (.txt)|*.txt";

            bool? result = dlg.ShowDialog();

            if (result == true)
            {
                TextFileContent.Text =File.ReadAllText(dlg.FileName);
            }
        }

    }
}
need markup?