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
- LingerOption.cs
- PropertyStore.cs
- LabelDesigner.cs
- CurrentChangingEventArgs.cs
- WmpBitmapEncoder.cs
- ScrollChangedEventArgs.cs
- MouseEventArgs.cs
- NewArrayExpression.cs
- LinqDataSourceView.cs
- SpecialFolderEnumConverter.cs
- ButtonFlatAdapter.cs
- JournalEntryStack.cs
- FileEnumerator.cs
- WebPartHelpVerb.cs
- ModelToObjectValueConverter.cs
- ExtensionCollection.cs
- sqlmetadatafactory.cs
- GestureRecognitionResult.cs
- CopyAttributesAction.cs
- KeyGesture.cs
- SecurityElement.cs
- BrowserCapabilitiesFactory.cs
- ReplacementText.cs
- AudioLevelUpdatedEventArgs.cs
- ResourcesGenerator.cs
- DataControlFieldCell.cs
- ZipArchive.cs
- CalendarDay.cs
- FormsAuthenticationEventArgs.cs
- mansign.cs
- Profiler.cs
- SpellerInterop.cs
- RelationshipWrapper.cs
- InputReportEventArgs.cs
- BooleanToSelectiveScrollingOrientationConverter.cs
- FastEncoderStatics.cs
- Volatile.cs
- WindowsFormsHost.cs
- EditorZoneAutoFormat.cs
- MimeMultiPart.cs
- TargetParameterCountException.cs
- KeyValueSerializer.cs
- XmlSchemaSimpleContentRestriction.cs
- sqlinternaltransaction.cs
- XPathExpr.cs
- SqlConnectionPoolProviderInfo.cs
- ToolStripContainer.cs
- CacheForPrimitiveTypes.cs
- SQLBinary.cs
- SecurityException.cs
- GeneralTransform3DGroup.cs
- MenuBase.cs
- SeverityFilter.cs
- ToolStripCustomTypeDescriptor.cs
- ComplexType.cs
- Delegate.cs
- XmlSchemaAnnotated.cs
- OrderToken.cs
- TimersDescriptionAttribute.cs
- ProgressBarRenderer.cs
- PermissionSetTriple.cs
- SqlComparer.cs
- PhoneCall.cs
- parserscommon.cs
- ThreadExceptionDialog.cs
- ApplyHostConfigurationBehavior.cs
- BitSet.cs
- TextTreeUndo.cs
- MasterPageBuildProvider.cs
- LassoSelectionBehavior.cs
- SessionStateItemCollection.cs
- LiteralControl.cs
- _UriSyntax.cs
- WebPartConnectionsCloseVerb.cs
- EntityRecordInfo.cs
- TabControlEvent.cs
- SchemaImporterExtensionElement.cs
- ConnectionStringsExpressionEditor.cs
- Bits.cs
- EmptyReadOnlyDictionaryInternal.cs
- ScriptResourceMapping.cs
- StringExpressionSet.cs
- Math.cs
- XmlDataSourceView.cs
- KeyboardNavigation.cs
- NumericExpr.cs
- SessionStateUtil.cs
- ObfuscateAssemblyAttribute.cs
- OLEDB_Util.cs
- AudioSignalProblemOccurredEventArgs.cs
- XmlChildNodes.cs
- SystemInfo.cs
- ExpressionEditorAttribute.cs
- FormatterConverter.cs
- EventLogPropertySelector.cs
- RequestQueue.cs
- VectorAnimationUsingKeyFrames.cs
- Constraint.cs
- XMLSchema.cs
- TypedReference.cs