Click here to Skip to main content
12,503,749 members (33,246 online)
Click here to Skip to main content

Stats

1.7M views
22.3K downloads
113 bookmarked
Posted

How to Create a WPF User Control & Use It in a WPF Application ( C# )

, 24 Jan 2009 CPOL
Creating a WPF User Control & using it in a WPF application ( C# )
CustomToolTip
bin
Release
CustomToolTip.dll
CustomToolTip.pdb
obj
Debug
CustomToolTip.csproj.GenerateResource.Cache
CustomToolTip.dll
CustomToolTip.g.resources
CustomToolTip.pdb
CustomToolTip.Properties.Resources.resources
CustomToolTip_MarkupCompile.cache
TempPE
UserControl1.baml
Release
CustomToolTip.csproj.GenerateResource.Cache
CustomToolTip.dll
CustomToolTip.g.resources
CustomToolTip.pdb
CustomToolTip.Properties.Resources.resources
CustomToolTip_MarkupCompile.cache
TempPE
Properties.Resources.Designer.cs.dll
UserControl1.baml
Properties
CustomToolTip.suo
CustomToolTip.sln.cache
CustomToolTip.dll
WpfApplication1.exe
WpfApplication1.suo
WpfApplication1.sln.cache
WpfApplication1
bin
Release
CustomToolTip.dll
CustomToolTip.pdb
WpfApplication1.exe
WpfApplication1.pdb
WpfApplication1.vshost.exe
WpfApplication1.vshost.exe.manifest
Properties
#pragma checksum "..\..\UserControl1.xaml" "{406ea660-64cf-4c82-b6f0-42d48172a799}" "13323344449D28B03167334967692239"
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:2.0.50727.3053
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </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 CustomToolTip {
    
    
    /// <summary>
    /// UserControl1
    /// </summary>
    public partial class UserControl1 : System.Windows.Controls.UserControl, System.Windows.Markup.IComponentConnector {
        
        
        #line 2 "..\..\UserControl1.xaml"
        internal CustomToolTip.UserControl1 UserControlToolTip;
        
        #line default
        #line hidden
        
        
        #line 14 "..\..\UserControl1.xaml"
        internal System.Windows.Media.TranslateTransform UserControlToolTipXY;
        
        #line default
        #line hidden
        
        
        #line 32 "..\..\UserControl1.xaml"
        internal System.Windows.Controls.TextBox TextBoxToolTip;
        
        #line default
        #line hidden
        
        
        #line 33 "..\..\UserControl1.xaml"
        internal System.Windows.Controls.TextBlock ToolTipTitle;
        
        #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("/CustomToolTip;component/usercontrol1.xaml", System.UriKind.Relative);
            
            #line 1 "..\..\UserControl1.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.UserControlToolTip = ((CustomToolTip.UserControl1)(target));
            return;
            case 2:
            this.UserControlToolTipXY = ((System.Windows.Media.TranslateTransform)(target));
            return;
            case 3:
            this.TextBoxToolTip = ((System.Windows.Controls.TextBox)(target));
            return;
            case 4:
            this.ToolTipTitle = ((System.Windows.Controls.TextBlock)(target));
            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)

Share

About the Author

Mohammad Dayyan
Iran (Islamic Republic of) Iran (Islamic Republic of)
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160919.1 | Last Updated 24 Jan 2009
Article Copyright 2009 by Mohammad Dayyan
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid