TemplatePartAttribute.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / System / Windows / TemplatePartAttribute.cs / 1 / TemplatePartAttribute.cs

                            //---------------------------------------------------------------------------- 
//
// Copyright (C) Microsoft Corporation.  All rights reserved.
//
//--------------------------------------------------------------------------- 

using System; 
 
namespace System.Windows
{ 
    /// 
    ///     Style authors should be able to identify the part type used for styling the specific class.
    /// The part is usually required in the style and should have a specific predefined name.
    ///  
    [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
    public sealed class TemplatePartAttribute : Attribute 
    { 
        /// 
        ///     Default constructor 
        /// 
        public TemplatePartAttribute()
        {
        } 

        ///  
        ///     Part name used by the class to indentify required element in the style 
        /// 
        public string Name 
        {
            get { return _name; }
            set { _name = value; }
        } 

        ///  
        ///     Type of the element that should be used as a part with name specified in TemplatePartAttribute.Name 
        /// 
        public Type Type 
        {
            get { return _type; }
            set { _type = value; }
        } 

        private string _name; 
        private Type _type; 
    }
} 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.


                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK