Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / Data / BindingWorker.cs / 3 / BindingWorker.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Defines BindingWorker base class. // //--------------------------------------------------------------------------- using System; using System.Reflection; using System.ComponentModel; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Threading; namespace MS.Internal.Data { // Base class for binding workers. // Derived classes implement binding functionality depending on the // type of source, e.g. ClrBindingWorker, XmlBindingWorker internal abstract class BindingWorker { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- protected BindingWorker(BindingExpression b) { _bindingExpression = b; } //------------------------------------------------------ // // Internal properties - used by parent BindingExpression // //----------------------------------------------------- internal virtual Type SourcePropertyType { get { return null; } } internal virtual bool CanUpdate { get { return false; } } internal BindingExpression ParentBindingExpression { get { return _bindingExpression; } } internal Type TargetPropertyType { get { return TargetProperty.PropertyType; } } internal virtual bool IsDBNullValidForUpdate { get { return false; } } //------------------------------------------------------ // // Internal methods - used by parent BindingExpression // //------------------------------------------------------ internal virtual void AttachDataItem() {} internal virtual void DetachDataItem() {} internal virtual void OnCurrentChanged(ICollectionView collectionView, EventArgs args) {} internal virtual object RawValue() { return null; } internal virtual void UpdateValue(object value) {} internal virtual void RefreshValue() {} internal virtual bool UsesDependencyProperty(DependencyObject d, DependencyProperty dp) { return false; } internal virtual void OnSourceInvalidation(DependencyObject d, DependencyProperty dp, bool isASubPropertyChange) {} internal virtual ValidationError ValidateDataError(BindingExpressionBase bindingExpressionBase) { return null; } //----------------------------------------------------- // // Protected Properties // //------------------------------------------------------ protected Binding ParentBinding { get { return ParentBindingExpression.ParentBinding; } } protected bool IsDynamic { get { return ParentBindingExpression.IsDynamic; } } internal bool IsReflective { get { return ParentBindingExpression.IsReflective; } } protected bool IgnoreSourcePropertyChange { get { return ParentBindingExpression.IgnoreSourcePropertyChange; } } protected object DataItem { get { return ParentBindingExpression.DataItem; } } protected DependencyObject TargetElement { get { return ParentBindingExpression.TargetElement; } } protected DependencyProperty TargetProperty { get { return ParentBindingExpression.TargetProperty; } } protected DataBindEngine Engine { get { return ParentBindingExpression.Engine; } } protected Dispatcher Dispatcher { get { return ParentBindingExpression.Dispatcher; } } protected BindingStatus Status { get { return ParentBindingExpression.Status; } set { ParentBindingExpression.SetStatus(value); } } //----------------------------------------------------- // // Protected Methods // //----------------------------------------------------- protected void SetTransferIsPending(bool value) { ParentBindingExpression.IsTransferPending = value; } //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ BindingExpression _bindingExpression; } } // 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
- XmlC14NWriter.cs
- GroupBoxDesigner.cs
- ClusterRegistryConfigurationProvider.cs
- TreeNodeStyle.cs
- TabPageDesigner.cs
- InternalTransaction.cs
- ArrayWithOffset.cs
- WebPageTraceListener.cs
- Attributes.cs
- SingleStorage.cs
- FieldMetadata.cs
- LogLogRecord.cs
- CodeSnippetTypeMember.cs
- Merger.cs
- ErrorFormatter.cs
- DateTimePicker.cs
- SoapSchemaExporter.cs
- DescendantOverDescendantQuery.cs
- User.cs
- XmlDataSource.cs
- WebPartTransformerCollection.cs
- SqlDataAdapter.cs
- WorkflowInlining.cs
- InkPresenterAutomationPeer.cs
- TextEndOfSegment.cs
- ArcSegment.cs
- ByteViewer.cs
- ConnectionOrientedTransportElement.cs
- MruCache.cs
- CodeNamespaceCollection.cs
- DataGridPageChangedEventArgs.cs
- HttpCapabilitiesSectionHandler.cs
- ServiceOperationInfoTypeConverter.cs
- ProfileManager.cs
- ApplicationManager.cs
- TCEAdapterGenerator.cs
- LinkGrep.cs
- WebZone.cs
- BamlWriter.cs
- Variant.cs
- DelimitedListTraceListener.cs
- MimeParameterWriter.cs
- ServiceModelSecurityTokenTypes.cs
- TextRenderer.cs
- UriParserTemplates.cs
- validationstate.cs
- PrimitiveSchema.cs
- ScrollItemPattern.cs
- StorageScalarPropertyMapping.cs
- XmlNotation.cs
- SqlError.cs
- ForEach.cs
- FixedSOMPage.cs
- AttributeUsageAttribute.cs
- Tracking.cs
- OdbcEnvironment.cs
- WebReferencesBuildProvider.cs
- TextElementAutomationPeer.cs
- Timer.cs
- DocumentSchemaValidator.cs
- WebSysDescriptionAttribute.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- dbenumerator.cs
- DelegateHelpers.Generated.cs
- DynamicArgumentDesigner.xaml.cs
- __Filters.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- SkewTransform.cs
- CodeExpressionStatement.cs
- FtpWebRequest.cs
- NetworkInformationException.cs
- _ConnectOverlappedAsyncResult.cs
- StateFinalizationActivity.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- AndAlso.cs
- AsyncDataRequest.cs
- MethodImplAttribute.cs
- Image.cs
- DataGridViewImageColumn.cs
- MenuItemAutomationPeer.cs
- DataTableNameHandler.cs
- TextWriterTraceListener.cs
- ScriptMethodAttribute.cs
- DataBindingHandlerAttribute.cs
- SafeFreeMibTable.cs
- GeneralTransformGroup.cs
- precedingquery.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- PageCodeDomTreeGenerator.cs
- FunctionQuery.cs
- BuildProvider.cs
- HandlerFactoryWrapper.cs
- MultiView.cs
- EncodingInfo.cs
- Symbol.cs
- TextEndOfLine.cs
- WeakReferenceKey.cs
- InvalidEnumArgumentException.cs
- SafeHandles.cs
- TextServicesCompartmentEventSink.cs