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
- SQLBinary.cs
- Empty.cs
- QueryStringParameter.cs
- EntityProviderServices.cs
- TreeNode.cs
- WebPartConnectionsCancelVerb.cs
- DataTransferEventArgs.cs
- XmlSchemaAll.cs
- EntityDesignerBuildProvider.cs
- PersonalizationProviderHelper.cs
- DBSchemaRow.cs
- DataViewManager.cs
- TextureBrush.cs
- WebEventCodes.cs
- RIPEMD160Managed.cs
- OleDbInfoMessageEvent.cs
- InputBindingCollection.cs
- PropertyDescriptor.cs
- WebPartConnection.cs
- FullTextBreakpoint.cs
- CustomBinding.cs
- _BasicClient.cs
- AudioStateChangedEventArgs.cs
- Solver.cs
- SiteIdentityPermission.cs
- ExtensionFile.cs
- ApplicationFileParser.cs
- SchemaNames.cs
- SymbolTable.cs
- GridItemPattern.cs
- TableLayoutPanel.cs
- ClientSession.cs
- CryptoSession.cs
- Buffer.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- log.cs
- XmlTextEncoder.cs
- PropertyInformationCollection.cs
- LinkedResource.cs
- LateBoundBitmapDecoder.cs
- ManagementPath.cs
- ToolStripItemClickedEventArgs.cs
- WindowsFormsDesignerOptionService.cs
- NativeMethods.cs
- ColumnResizeAdorner.cs
- UnsafeNativeMethods.cs
- PackWebRequestFactory.cs
- QueryExpression.cs
- UniqueEventHelper.cs
- SystemInformation.cs
- WebRequestModulesSection.cs
- HelpKeywordAttribute.cs
- TreeNode.cs
- XmlBinaryReader.cs
- CreateUserWizardStep.cs
- DataGridViewRowCancelEventArgs.cs
- XmlDigitalSignatureProcessor.cs
- GreenMethods.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ExpressionBinding.cs
- TargetParameterCountException.cs
- StringCollectionEditor.cs
- Encoder.cs
- LongValidator.cs
- ProcessHostConfigUtils.cs
- TakeQueryOptionExpression.cs
- BindingList.cs
- securitycriticaldataformultiplegetandset.cs
- IsolationInterop.cs
- TraceInternal.cs
- FacetEnabledSchemaElement.cs
- ThrowHelper.cs
- SiteMap.cs
- HttpRequest.cs
- FlowDecisionLabelFeature.cs
- EventHandlerList.cs
- XamlClipboardData.cs
- Shape.cs
- SQLDecimalStorage.cs
- BaseProcessor.cs
- WindowsGraphics.cs
- DataGridViewCheckBoxColumn.cs
- SubclassTypeValidatorAttribute.cs
- ArgumentNullException.cs
- MetaColumn.cs
- Stroke.cs
- CodeDOMUtility.cs
- ImageButton.cs
- UpdateProgress.cs
- ClaimSet.cs
- Errors.cs
- XmlProcessingInstruction.cs
- RestHandler.cs
- TextBox.cs
- _NativeSSPI.cs
- DependencyObjectType.cs
- DataGridCellAutomationPeer.cs
- FreezableCollection.cs
- MinimizableAttributeTypeConverter.cs
- SqlConnectionPoolGroupProviderInfo.cs