My name is Edward Tanguay. I'm an American software and web developer living and working in Berlin, Germany.
9 hours ago: Here's a use-case for datapod format, recording human-readable data that later can be used as a datasource: http://is.gd/eSsLg @pholdings.
9 hours ago: "Subscriptions are available to U.S. addresses only." http://www.highlights.com another global economy #fail.
10 hours ago: "Subscriptions are available to U.S. addresses only." http://www.highlights.com another global #fail.
11 hours ago: My notes on podcast with author Aimee Bender's Lemoncake book, "a normal kid punished by expectations of giftedness": http://is.gd/eSsLg.
12 hours ago: Interesting: "one page per book": http://openlibrary.org/about.
12 hours ago: Another after-work 8K, did 5K in 23:33, getting cooler here as #berlin #marathon approaches: http://is.gd/eSp95.
yesterday: C# CODE EXAMPLE: Extension method for checking regex in one line: http://is.gd/eQzyg.
yesterday: New podcast source: "I don't want to put you to sleep, but I want to be as rich, and rewarding, and resident as a dream.":http://is.gd/eQrdC.
yesterday: An intense colin marshall interview with michael silverblatt on the art of interviewing & more: http://is.gd/eQqve (search for "blatt").
yesterday: The stackexchange site for wordpress is up: get your answers / establish your reputation @cottonr http://wordpress.stackexchange.com.
2 days ago: "I've always felt that any time you can use a tuple, you should use a struct.": http://is.gd/eQm9V.
WPF CODE EXAMPLE created on Monday, January 26, 2009 permalink
How to create a simple text editor with menu
WPF makes it simple to create an application with a classic menu, here is the XAML:
<Window x:Class="WpfApplication6.Window8"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window8" Height="300" Width="300">
    <DockPanel LastChildFill="True">
        <Menu DockPanel.Dock="top">
            <MenuItem Header="_Edit">
                <MenuItem Header="Cu_t" Command="ApplicationCommands.Cut"/>
                <MenuItem Header="_Copy" Command="ApplicationCommands.Copy"/>
                <MenuItem Header="_Paste" Command="ApplicationCommands.Paste"/>
                <Separator/>
                <MenuItem Header="_Select All" Click="SelectAll_Click"/>
                <MenuItem Header="_Clear" Click="Clear_Click"/>
            </MenuItem>
            <MenuItem Header="_Format">
                <MenuItem Name="miNormal" Header="_Normal" Click="TextStyle_Click"/>
                <MenuItem Name="miBold" Header="_Bold" Click="TextStyle_Click"/>
            </MenuItem>
        </Menu>
        <TextBox Name="txtEditArea" TextWrapping="Wrap" Margin="10">
            This is where the text goes. This is where the text goes. This is where the text goes. This is where the text goes. This is where the text goes. This is where the text goes. This is where the text goes. This is where the text goes.
        </TextBox>
    </DockPanel>
</Window>

and here is the code behind, you'll have to change the namespaces, etc.
namespace WpfApplication6
{
    /// <summary>
    /// Interaction logic for Window8.xaml
    /// </summary>
    public partial class Window8 : Window
    {
        public Window8()
        {
            InitializeComponent();

            txtEditArea.Focus();
        }

        private void SelectAll_Click(object sender, RoutedEventArgs e)
        {
            txtEditArea.SelectAll();
        }

        private void Clear_Click(object sender, RoutedEventArgs e)
        {
            txtEditArea.Clear();
        }

        private void TextStyle_Click(object sender, RoutedEventArgs e)
        {
            if (sender == miNormal)
            {
                txtEditArea.FontWeight = FontWeights.Normal;
                txtEditArea.FontStyle = FontStyles.Normal;
            }
            else if (sender == miBold)
            {
                txtEditArea.FontWeight = FontWeights.Bold;
            }
        }
    }
}
need markup?