Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- OleDbConnection.cs
- XpsInterleavingPolicy.cs
- SqlDataSourceQuery.cs
- Win32Native.cs
- XmlSchemaSimpleTypeRestriction.cs
- ListMarkerLine.cs
- LinqTreeNodeEvaluator.cs
- TreeSet.cs
- StringReader.cs
- HttpModulesSection.cs
- AdjustableArrowCap.cs
- ProviderBase.cs
- util.cs
- WasHostedComPlusFactory.cs
- ListenerChannelContext.cs
- MimeFormImporter.cs
- WebBrowserProgressChangedEventHandler.cs
- XPathAxisIterator.cs
- MouseButton.cs
- FreezableDefaultValueFactory.cs
- RepeaterItemCollection.cs
- AtomEntry.cs
- CounterCreationDataCollection.cs
- AttributeCollection.cs
- MachineKeySection.cs
- ParameterCollection.cs
- ContentDesigner.cs
- ResourceDescriptionAttribute.cs
- DiffuseMaterial.cs
- GeometryDrawing.cs
- HMACSHA256.cs
- TagPrefixAttribute.cs
- TableAutomationPeer.cs
- MemoryFailPoint.cs
- XhtmlTextWriter.cs
- Attribute.cs
- FlowDocumentView.cs
- RTLAwareMessageBox.cs
- PathFigure.cs
- HttpAsyncResult.cs
- ObjectDisposedException.cs
- XPathBuilder.cs
- mactripleDES.cs
- SelfIssuedTokenFactoryCredential.cs
- CompressedStack.cs
- XmlNamedNodeMap.cs
- XamlInt32CollectionSerializer.cs
- GlyphInfoList.cs
- StackBuilderSink.cs
- BackgroundWorker.cs
- XPathNodeList.cs
- Composition.cs
- CreateUserWizardStep.cs
- SpeakProgressEventArgs.cs
- MemberMaps.cs
- PictureBox.cs
- SystemFonts.cs
- X509ChainElement.cs
- Win32.cs
- BindableTemplateBuilder.cs
- Int32EqualityComparer.cs
- ValidatorCollection.cs
- WsdlBuildProvider.cs
- UnionCodeGroup.cs
- Convert.cs
- Sentence.cs
- ClientOptions.cs
- DataSourceSelectArguments.cs
- SelectionWordBreaker.cs
- oledbmetadatacollectionnames.cs
- isolationinterop.cs
- UidManager.cs
- GPRECT.cs
- UnknownBitmapEncoder.cs
- TaskFormBase.cs
- ReliableSessionElement.cs
- ScriptManagerProxy.cs
- DesignBindingPicker.cs
- TemplateApplicationHelper.cs
- XPathNodeList.cs
- ExecutedRoutedEventArgs.cs
- ConstraintStruct.cs
- ParameterElement.cs
- UriScheme.cs
- ConstraintEnumerator.cs
- PaperSource.cs
- HtmlShimManager.cs
- PersistenceTypeAttribute.cs
- DataObjectAttribute.cs
- ResolveDuplex11AsyncResult.cs
- Keywords.cs
- EncoderBestFitFallback.cs
- ToolboxComponentsCreatedEventArgs.cs
- UniqueIdentifierService.cs
- WinInet.cs
- basevalidator.cs
- SystemColors.cs
- ScaleTransform3D.cs
- EntityModelSchemaGenerator.cs
- List.cs