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
- XmlSchemaElement.cs
- GeneralTransform.cs
- StyleModeStack.cs
- WeakHashtable.cs
- GraphicsContext.cs
- PrtTicket_Public_Simple.cs
- DataContext.cs
- KoreanCalendar.cs
- RSAOAEPKeyExchangeFormatter.cs
- ExtendedProperty.cs
- Marshal.cs
- PresentationSource.cs
- HealthMonitoringSectionHelper.cs
- HebrewCalendar.cs
- SerializationObjectManager.cs
- TextEditor.cs
- HtmlWindowCollection.cs
- MobileDeviceCapabilitiesSectionHandler.cs
- Module.cs
- UTF8Encoding.cs
- Int16AnimationUsingKeyFrames.cs
- XmlSchemaComplexContentRestriction.cs
- DataGridCommandEventArgs.cs
- XmlName.cs
- GroupBox.cs
- Label.cs
- AnimationClock.cs
- SoapExtensionTypeElement.cs
- GregorianCalendar.cs
- ApplicationHost.cs
- StylusButtonEventArgs.cs
- QueryCacheKey.cs
- SHA512Cng.cs
- Classification.cs
- sqlinternaltransaction.cs
- SourceFilter.cs
- OracleMonthSpan.cs
- ControlEvent.cs
- PixelShader.cs
- PtsContext.cs
- BitmapEffectGeneralTransform.cs
- MediaTimeline.cs
- IdnMapping.cs
- MenuItemCollection.cs
- ControlIdConverter.cs
- SqlDataReaderSmi.cs
- UnsafeNativeMethodsMilCoreApi.cs
- RijndaelManaged.cs
- NumericPagerField.cs
- ValidationHelper.cs
- ConfigurationManager.cs
- ListViewGroup.cs
- ObjectDataSourceDisposingEventArgs.cs
- PersonalizableAttribute.cs
- IMembershipProvider.cs
- AssemblyNameProxy.cs
- LinqDataSourceHelper.cs
- Grant.cs
- Literal.cs
- XPathConvert.cs
- ButtonBase.cs
- PieceNameHelper.cs
- WpfMemberInvoker.cs
- TableAdapterManagerGenerator.cs
- RootProfilePropertySettingsCollection.cs
- IisTraceListener.cs
- AssociationSet.cs
- CustomCategoryAttribute.cs
- StructuralObject.cs
- TextView.cs
- Viewport2DVisual3D.cs
- DocumentViewerConstants.cs
- SrgsToken.cs
- Quaternion.cs
- Rotation3DAnimation.cs
- TextViewSelectionProcessor.cs
- WpfPayload.cs
- SpanIndex.cs
- HandlerBase.cs
- DependencyPropertyKey.cs
- DataGridViewLayoutData.cs
- WebPartMovingEventArgs.cs
- TdsRecordBufferSetter.cs
- ImageBrush.cs
- SystemFonts.cs
- TiffBitmapEncoder.cs
- InstanceKey.cs
- XmlArrayAttribute.cs
- TaskFormBase.cs
- RegistryKey.cs
- TTSEvent.cs
- ThreadInterruptedException.cs
- UnionCqlBlock.cs
- WinOEToolBoxItem.cs
- LicenseException.cs
- ToolTipService.cs
- XmlDownloadManager.cs
- CurrentChangingEventArgs.cs
- LogLogRecordHeader.cs
- CopyOnWriteList.cs