TemplateBindingExpression.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / TemplateBindingExpression.cs / 1 / TemplateBindingExpression.cs

                            /****************************************************************************\ 
*
* File: TemplateBindingExpression.cs
*
*  Expression to represent a TemplateBindingExtension during editing of a 
*  template.
* 
* Copyright (C) 2005 by Microsoft Corporation.  All rights reserved. 
*
\***************************************************************************/ 

using System;
using System.ComponentModel;
using System.Windows; 
using System.Windows.Data;
using System.Windows.Markup; 
 
namespace System.Windows
{ 

    /// 
    /// A TemplateBinding is used in templates (e.g. ControlTemplate).  When the content of
    /// a template is instantiated for inspection, the template bindings are represented with 
    ///  a TemplateBindingExpression.  (In this case, the expression returns the property's default
    /// value.) 
    ///  

    [TypeConverter(typeof(TemplateBindingExpressionConverter))] 
    public class TemplateBindingExpression : Expression
    {
        private TemplateBindingExtension _templateBindingExtension;
 
        internal TemplateBindingExpression( TemplateBindingExtension templateBindingExtension )
        { 
            _templateBindingExtension = templateBindingExtension; 
        }
 

        /// 
        /// Constructor for TemplateBindingExpression
        ///  
        public TemplateBindingExtension TemplateBindingExtension
        { 
            get { return _templateBindingExtension; } 
        }
 

        /// 
        ///     Called to evaluate the Expression value
        ///  
        /// DependencyObject being queried
        /// Property being queried 
        /// Computed value. Default (of the target) if unavailable. 
        internal override object GetValue(DependencyObject d, DependencyProperty dp)
        { 
            return dp.GetDefaultValue(d.DependencyObjectType);
        }

 
    }
 
 
}
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
/****************************************************************************\ 
*
* File: TemplateBindingExpression.cs
*
*  Expression to represent a TemplateBindingExtension during editing of a 
*  template.
* 
* Copyright (C) 2005 by Microsoft Corporation.  All rights reserved. 
*
\***************************************************************************/ 

using System;
using System.ComponentModel;
using System.Windows; 
using System.Windows.Data;
using System.Windows.Markup; 
 
namespace System.Windows
{ 

    /// 
    /// A TemplateBinding is used in templates (e.g. ControlTemplate).  When the content of
    /// a template is instantiated for inspection, the template bindings are represented with 
    ///  a TemplateBindingExpression.  (In this case, the expression returns the property's default
    /// value.) 
    ///  

    [TypeConverter(typeof(TemplateBindingExpressionConverter))] 
    public class TemplateBindingExpression : Expression
    {
        private TemplateBindingExtension _templateBindingExtension;
 
        internal TemplateBindingExpression( TemplateBindingExtension templateBindingExtension )
        { 
            _templateBindingExtension = templateBindingExtension; 
        }
 

        /// 
        /// Constructor for TemplateBindingExpression
        ///  
        public TemplateBindingExtension TemplateBindingExtension
        { 
            get { return _templateBindingExtension; } 
        }
 

        /// 
        ///     Called to evaluate the Expression value
        ///  
        /// DependencyObject being queried
        /// Property being queried 
        /// Computed value. Default (of the target) if unavailable. 
        internal override object GetValue(DependencyObject d, DependencyProperty dp)
        { 
            return dp.GetDefaultValue(d.DependencyObjectType);
        }

 
    }
 
 
}
 

// 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