Click here to Skip to main content
15,895,370 members
Articles / Desktop Programming / WPF

WPF RichTextEditor with Toolbar

Rate me:
Please Sign up or sign in to vote.
4.86/5 (23 votes)
5 Jan 2010CPOL2 min read 128.9K   13.6K   64  
WPF RichTextBox with standard Text-formatting possiblities
#pragma checksum "..\..\ColorPicker.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "298AA59ACE8969BEAB8DD3A59F717866"
//------------------------------------------------------------------------------
// <auto-generated>
//     Dieser Code wurde von einem Tool generiert.
//     Laufzeitversion:2.0.50727.4927
//
//     Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
//     der Code erneut generiert wird.
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Diagnostics;
using System.Windows;
using System.Windows.Automation;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Markup;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Effects;
using System.Windows.Media.Imaging;
using System.Windows.Media.Media3D;
using System.Windows.Media.TextFormatting;
using System.Windows.Navigation;
using System.Windows.Shapes;


namespace ColorPicker {
    
    
    /// <summary>
    /// ColorPickerControl
    /// </summary>
    public partial class ColorPickerControl : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
        
        
        #line 8 "..\..\ColorPicker.xaml"
        internal ColorPicker.ColorPickerControl UserControl;
        
        #line default
        #line hidden
        
        
        #line 51 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Image ImgSqaure1;
        
        #line default
        #line hidden
        
        
        #line 55 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Image ImgSqaure2;
        
        #line default
        #line hidden
        
        
        #line 59 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Image ImgCircle1;
        
        #line default
        #line hidden
        
        
        #line 83 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Image ColorImage;
        
        #line default
        #line hidden
        
        
        #line 88 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Canvas CanvImage;
        
        #line default
        #line hidden
        
        
        #line 95 "..\..\ColorPicker.xaml"
        internal System.Windows.Shapes.Ellipse ellipsePixel;
        
        #line default
        #line hidden
        
        
        #line 112 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.InkPresenter previewPresenter;
        
        #line default
        #line hidden
        
        
        #line 126 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtAlpha;
        
        #line default
        #line hidden
        
        
        #line 131 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtAlphaHex;
        
        #line default
        #line hidden
        
        
        #line 142 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtRed;
        
        #line default
        #line hidden
        
        
        #line 147 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtRedHex;
        
        #line default
        #line hidden
        
        
        #line 158 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtGreen;
        
        #line default
        #line hidden
        
        
        #line 164 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtGreenHex;
        
        #line default
        #line hidden
        
        
        #line 176 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtBlue;
        
        #line default
        #line hidden
        
        
        #line 181 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtBlueHex;
        
        #line default
        #line hidden
        
        
        #line 190 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.TextBox txtAll;
        
        #line default
        #line hidden
        
        
        #line 200 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Border AlphaBorder;
        
        #line default
        #line hidden
        
        
        #line 203 "..\..\ColorPicker.xaml"
        internal System.Windows.Controls.Slider AlphaSlider;
        
        #line default
        #line hidden
        
        private bool _contentLoaded;
        
        /// <summary>
        /// InitializeComponent
        /// </summary>
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        public void InitializeComponent() {
            if (_contentLoaded) {
                return;
            }
            _contentLoaded = true;
            System.Uri resourceLocater = new System.Uri("/ColorPicker;component/colorpicker.xaml", System.UriKind.Relative);
            
            #line 1 "..\..\ColorPicker.xaml"
            System.Windows.Application.LoadComponent(this, resourceLocater);
            
            #line default
            #line hidden
        }
        
        [System.Diagnostics.DebuggerNonUserCodeAttribute()]
        [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)]
        [System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Design", "CA1033:InterfaceMethodsShouldBeCallableByChildTypes")]
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
            switch (connectionId)
            {
            case 1:
            this.UserControl = ((ColorPicker.ColorPickerControl)(target));
            return;
            case 2:
            this.ImgSqaure1 = ((System.Windows.Controls.Image)(target));
            
            #line 54 "..\..\ColorPicker.xaml"
            this.ImgSqaure1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Swatch_MouseLeftButtonDown);
            
            #line default
            #line hidden
            return;
            case 3:
            this.ImgSqaure2 = ((System.Windows.Controls.Image)(target));
            
            #line 58 "..\..\ColorPicker.xaml"
            this.ImgSqaure2.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Swatch_MouseLeftButtonDown);
            
            #line default
            #line hidden
            return;
            case 4:
            this.ImgCircle1 = ((System.Windows.Controls.Image)(target));
            
            #line 62 "..\..\ColorPicker.xaml"
            this.ImgCircle1.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Swatch_MouseLeftButtonDown);
            
            #line default
            #line hidden
            return;
            case 5:
            this.ColorImage = ((System.Windows.Controls.Image)(target));
            return;
            case 6:
            this.CanvImage = ((System.Windows.Controls.Canvas)(target));
            
            #line 92 "..\..\ColorPicker.xaml"
            this.CanvImage.MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.CanvImage_MouseDown);
            
            #line default
            #line hidden
            
            #line 93 "..\..\ColorPicker.xaml"
            this.CanvImage.MouseUp += new System.Windows.Input.MouseButtonEventHandler(this.CanvImage_MouseUp);
            
            #line default
            #line hidden
            
            #line 94 "..\..\ColorPicker.xaml"
            this.CanvImage.MouseMove += new System.Windows.Input.MouseEventHandler(this.CanvImage_MouseMove);
            
            #line default
            #line hidden
            return;
            case 7:
            this.ellipsePixel = ((System.Windows.Shapes.Ellipse)(target));
            return;
            case 8:
            this.previewPresenter = ((System.Windows.Controls.InkPresenter)(target));
            return;
            case 9:
            this.txtAlpha = ((System.Windows.Controls.TextBox)(target));
            return;
            case 10:
            this.txtAlphaHex = ((System.Windows.Controls.TextBox)(target));
            return;
            case 11:
            this.txtRed = ((System.Windows.Controls.TextBox)(target));
            return;
            case 12:
            this.txtRedHex = ((System.Windows.Controls.TextBox)(target));
            return;
            case 13:
            this.txtGreen = ((System.Windows.Controls.TextBox)(target));
            return;
            case 14:
            this.txtGreenHex = ((System.Windows.Controls.TextBox)(target));
            return;
            case 15:
            this.txtBlue = ((System.Windows.Controls.TextBox)(target));
            return;
            case 16:
            this.txtBlueHex = ((System.Windows.Controls.TextBox)(target));
            return;
            case 17:
            this.txtAll = ((System.Windows.Controls.TextBox)(target));
            return;
            case 18:
            this.AlphaBorder = ((System.Windows.Controls.Border)(target));
            return;
            case 19:
            this.AlphaSlider = ((System.Windows.Controls.Slider)(target));
            
            #line 208 "..\..\ColorPicker.xaml"
            this.AlphaSlider.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler<double>(this.AlphaSlider_ValueChanged);
            
            #line default
            #line hidden
            return;
            }
            this._contentLoaded = true;
        }
    }
}

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
Germany Germany
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions