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
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PresentationUIStyleResources.cs
- ConnectionPoolManager.cs
- SettingsAttributeDictionary.cs
- Utils.cs
- ImageMapEventArgs.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- DataGridViewColumnDividerDoubleClickEventArgs.cs
- DeleteWorkflowOwnerCommand.cs
- ValueExpressions.cs
- ExpressionDumper.cs
- _LocalDataStore.cs
- Metafile.cs
- CommandBinding.cs
- CompositionCommandSet.cs
- dataSvcMapFileLoader.cs
- ParserOptions.cs
- CodeChecksumPragma.cs
- CancellationToken.cs
- ClaimComparer.cs
- PresentationSource.cs
- SqlStatistics.cs
- ToReply.cs
- PrintPreviewGraphics.cs
- Compress.cs
- ReturnType.cs
- DecimalKeyFrameCollection.cs
- XamlGridLengthSerializer.cs
- Header.cs
- ColumnWidthChangedEvent.cs
- JournalEntryStack.cs
- SpeechUI.cs
- RSAOAEPKeyExchangeDeformatter.cs
- BamlTreeNode.cs
- XPathMessageFilterElement.cs
- EdmItemCollection.cs
- StreamSecurityUpgradeInitiatorAsyncResult.cs
- OrderedEnumerableRowCollection.cs
- ObjectStateEntryOriginalDbUpdatableDataRecord.cs
- CloudCollection.cs
- ColorBuilder.cs
- DataColumnMapping.cs
- DataSetMappper.cs
- AnimationClock.cs
- ByteStream.cs
- XPathChildIterator.cs
- WebConfigManager.cs
- FillRuleValidation.cs
- UIInitializationException.cs
- HostingEnvironment.cs
- TextEditorCopyPaste.cs
- AudienceUriMode.cs
- QueryGenerator.cs
- NativeMethods.cs
- TextSearch.cs
- XmlCharCheckingReader.cs
- RequestCache.cs
- SchemaMerger.cs
- EntityCommandExecutionException.cs
- ResourcesChangeInfo.cs
- SqlDataSourceEnumerator.cs
- ReverseInheritProperty.cs
- Sequence.cs
- ByteAnimationBase.cs
- SQLBinary.cs
- DbFunctionCommandTree.cs
- PointConverter.cs
- WorkflowInstance.cs
- StorageEntityContainerMapping.cs
- GeneralTransform.cs
- formatter.cs
- State.cs
- SmtpNtlmAuthenticationModule.cs
- ColorBlend.cs
- SchemaAttDef.cs
- _LocalDataStoreMgr.cs
- TextTreeNode.cs
- SigningCredentials.cs
- Pair.cs
- HtmlShim.cs
- Decoder.cs
- DataGridItemEventArgs.cs
- PropertyGroupDescription.cs
- DateBoldEvent.cs
- HttpRequestCacheValidator.cs
- TreeNodeSelectionProcessor.cs
- CodePageUtils.cs
- TemplateEditingVerb.cs
- Simplifier.cs
- ScriptingWebServicesSectionGroup.cs
- MultiAsyncResult.cs
- LayoutSettings.cs
- ByteConverter.cs
- EventHandlersStore.cs
- AsyncCallback.cs
- GroupBoxDesigner.cs
- SuppressIldasmAttribute.cs
- DefaultAssemblyResolver.cs
- TrackingProfileManager.cs
- FrameworkTextComposition.cs
- GridView.cs