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
- SamlAuthenticationClaimResource.cs
- TextTabProperties.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- SqlDataRecord.cs
- XmlTextReader.cs
- DbConnectionPool.cs
- FrameworkRichTextComposition.cs
- TextReader.cs
- BinHexDecoder.cs
- NumericUpDown.cs
- XmlQualifiedName.cs
- GridViewUpdatedEventArgs.cs
- ProfileGroupSettingsCollection.cs
- X509Certificate.cs
- DataViewManager.cs
- ListViewDeleteEventArgs.cs
- RequiredAttributeAttribute.cs
- Types.cs
- BoundColumn.cs
- TemplatedMailWebEventProvider.cs
- DateTimeConverter.cs
- TextBoxAutomationPeer.cs
- DbQueryCommandTree.cs
- HijriCalendar.cs
- FunctionMappingTranslator.cs
- XslUrlEditor.cs
- DataContractSerializerSection.cs
- ComponentDispatcherThread.cs
- HtmlInputButton.cs
- XmlImplementation.cs
- Process.cs
- ComboBoxRenderer.cs
- ResXFileRef.cs
- SafeThemeHandle.cs
- CollectionViewGroup.cs
- BypassElement.cs
- SessionStateModule.cs
- Atom10FormatterFactory.cs
- TakeQueryOptionExpression.cs
- SelectingProviderEventArgs.cs
- ListViewDesigner.cs
- FuncCompletionCallbackWrapper.cs
- FixedFindEngine.cs
- BehaviorEditorPart.cs
- Viewport3DAutomationPeer.cs
- DataSourceHelper.cs
- ParsedRoute.cs
- DeviceContext2.cs
- CallContext.cs
- TabletDevice.cs
- Line.cs
- ProfileParameter.cs
- XmlSchemaComplexContentExtension.cs
- UInt16.cs
- FieldInfo.cs
- AttributeCollection.cs
- GroupAggregateExpr.cs
- WmlSelectionListAdapter.cs
- MSAAWinEventWrap.cs
- DirtyTextRange.cs
- EraserBehavior.cs
- AutomationIdentifier.cs
- SecureConversationServiceCredential.cs
- TextRunCache.cs
- TypeSystem.cs
- BindingContext.cs
- BooleanAnimationBase.cs
- EntityDataSourceSelectingEventArgs.cs
- CreateUserWizardStep.cs
- Drawing.cs
- SafeArrayTypeMismatchException.cs
- OverflowException.cs
- TextServicesProperty.cs
- Parser.cs
- DesignerDataTableBase.cs
- PathTooLongException.cs
- ValidatedControlConverter.cs
- PersonalizationAdministration.cs
- TaiwanCalendar.cs
- ModelServiceImpl.cs
- invalidudtexception.cs
- CodeTypeMemberCollection.cs
- GorillaCodec.cs
- GorillaCodec.cs
- BasicCellRelation.cs
- RoleExceptions.cs
- QueuePathEditor.cs
- XsdDuration.cs
- ProfileSection.cs
- TreeNodeStyleCollection.cs
- DataSourceCacheDurationConverter.cs
- HotCommands.cs
- SHA384CryptoServiceProvider.cs
- MenuItem.cs
- SplitterCancelEvent.cs
- RequestCachePolicy.cs
- Visual3D.cs
- GetIndexBinder.cs
- CompilerInfo.cs
- ImageSource.cs