Click here to Skip to main content
15,897,891 members
Articles / Desktop Programming / WPF

WPF RichText Editor

Rate me:
Please Sign up or sign in to vote.
4.90/5 (81 votes)
10 Jun 2009CPOL4 min read 359.5K   15.3K   249  
Bindable WPF WYSIWYG Text Editor
<Window x:Class="WpfRichText.Ex.Window1"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ctl="clr-namespace:WpfRichText.Ex.Controls"
        xmlns:attached="clr-namespace:WpfRichText.Ex.AttachedProperties"
        Title="Window1" Height="313" Width="619">
    <Grid>
        <StackPanel>
            <Label Content="WPF RichText Editor" FontWeight="Bold" FontSize="15" Margin="5"/>
            <ctl:RichTextEditor Text="{Binding Text, Mode=TwoWay}"/>
            <Button Content="Get XAML" Margin="5" Height="30" 
                    Command="{Binding GetXamlCommand}"/>
        </StackPanel>
        
    </Grid>
</Window>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
Singapore Singapore
Michael Sync is a Microsoft MVP for Silverlight and a member of Microsoft WPF/Silverlight Insider Team.

Please find more details about me in my blog.

Comments and Discussions