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
- BamlResourceDeserializer.cs
- ViewStateModeByIdAttribute.cs
- WebPartDisplayModeCollection.cs
- AutomationPropertyInfo.cs
- ProxyGenerationError.cs
- OleServicesContext.cs
- SQLStringStorage.cs
- TabControlToolboxItem.cs
- _NegotiateClient.cs
- ComplexPropertyEntry.cs
- DataRowCollection.cs
- RegisteredExpandoAttribute.cs
- PageThemeCodeDomTreeGenerator.cs
- PointCollection.cs
- KeyFrames.cs
- Rotation3DKeyFrameCollection.cs
- ObjectFullSpanRewriter.cs
- Menu.cs
- SigningDialog.cs
- ProtocolViolationException.cs
- FixedDocumentSequencePaginator.cs
- ListDataBindEventArgs.cs
- FieldToken.cs
- ProviderBase.cs
- PropertyTabAttribute.cs
- DefaultBinder.cs
- CapabilitiesRule.cs
- TextUtf8RawTextWriter.cs
- HMACSHA512.cs
- NumberFormatInfo.cs
- IRCollection.cs
- LinkDescriptor.cs
- XamlToRtfParser.cs
- SafeProcessHandle.cs
- PeerContact.cs
- AttributeUsageAttribute.cs
- ComboBox.cs
- SessionPageStatePersister.cs
- HttpChannelHelper.cs
- BaseTemplateCodeDomTreeGenerator.cs
- SecurityChannelFaultConverter.cs
- SplineQuaternionKeyFrame.cs
- TextClipboardData.cs
- PropertyNames.cs
- ScriptServiceAttribute.cs
- ReliabilityContractAttribute.cs
- MachineKeySection.cs
- Control.cs
- ScrollEventArgs.cs
- CompilerScope.Storage.cs
- RepeatButton.cs
- Point3DConverter.cs
- ToolstripProfessionalRenderer.cs
- ValidationEventArgs.cs
- WorkflowServiceOperationListItem.cs
- WebPartTracker.cs
- UIElementAutomationPeer.cs
- Boolean.cs
- SqlAggregateChecker.cs
- OdbcStatementHandle.cs
- ProfileParameter.cs
- DependencyPropertyDescriptor.cs
- EncryptedKey.cs
- ImageMapEventArgs.cs
- HttpRequestWrapper.cs
- CodeCommentStatement.cs
- IdentityManager.cs
- IdnMapping.cs
- RemotingAttributes.cs
- ProfilePropertyNameValidator.cs
- OleAutBinder.cs
- IPEndPointCollection.cs
- SequentialUshortCollection.cs
- SelectionWordBreaker.cs
- NameValueCollection.cs
- AdornedElementPlaceholder.cs
- DtdParser.cs
- HttpHandler.cs
- ApplicationTrust.cs
- SvcMapFileSerializer.cs
- StringOutput.cs
- ListControl.cs
- ScriptingScriptResourceHandlerSection.cs
- InstanceDescriptor.cs
- ValidationResult.cs
- OutputCacheSettings.cs
- Light.cs
- PieceNameHelper.cs
- CssStyleCollection.cs
- ListViewDataItem.cs
- SupportingTokenBindingElement.cs
- StringPropertyBuilder.cs
- PersistChildrenAttribute.cs
- DataGridViewComboBoxEditingControl.cs
- HttpCacheParams.cs
- FrameAutomationPeer.cs
- UrlPath.cs
- PartialTrustVisibleAssemblyCollection.cs
- ListControlActionList.cs
- ButtonStandardAdapter.cs