Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Markup / TemplateComponentConnector.cs / 1 / TemplateComponentConnector.cs
/****************************************************************************\ * * File: OptimizedTemplateComponentConnector.cs * * Purpose: Provides an IComponentConnector which is used in instantiation * of optimized template content. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Xml; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Windows.Data; using System.Globalization; using MS.Utility; namespace System.Windows.Markup { // This class provides an IComponentConnector implementation for use during instantiation // of optimized template content. It is given an IComponentConnector, and most calls are // just forwarded to it. But it is also given an IStyleConnector, and calls to Connect // are sent there instead. internal class TemplateComponentConnector : IComponentConnector { internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector ) { _styleConnector = styleConnector; _componentConnector = componentConnector; } public void InitializeComponent() { _componentConnector.InitializeComponent(); } public void Connect(int connectionId, object target) { // Calls to IComponentConnector.Connect from template content get forwarded // to the outer style connector (when we have one). if (_styleConnector != null) { _styleConnector.Connect(connectionId, target); } else { _componentConnector.Connect(connectionId, target); } } private IStyleConnector _styleConnector; private IComponentConnector _componentConnector; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. /****************************************************************************\ * * File: OptimizedTemplateComponentConnector.cs * * Purpose: Provides an IComponentConnector which is used in instantiation * of optimized template content. * * Copyright (C) 2005 by Microsoft Corporation. All rights reserved. * \***************************************************************************/ using System; using System.Xml; using System.IO; using System.Windows; using System.Windows.Media; using System.Windows.Navigation; using System.Text; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Windows.Controls; using System.Windows.Documents; using System.Windows.Media.Animation; using System.Diagnostics; using System.Reflection; using System.Windows.Threading; using System.Windows.Data; using System.Globalization; using MS.Utility; namespace System.Windows.Markup { // This class provides an IComponentConnector implementation for use during instantiation // of optimized template content. It is given an IComponentConnector, and most calls are // just forwarded to it. But it is also given an IStyleConnector, and calls to Connect // are sent there instead. internal class TemplateComponentConnector : IComponentConnector { internal TemplateComponentConnector( IComponentConnector componentConnector, IStyleConnector styleConnector ) { _styleConnector = styleConnector; _componentConnector = componentConnector; } public void InitializeComponent() { _componentConnector.InitializeComponent(); } public void Connect(int connectionId, object target) { // Calls to IComponentConnector.Connect from template content get forwarded // to the outer style connector (when we have one). if (_styleConnector != null) { _styleConnector.Connect(connectionId, target); } else { _componentConnector.Connect(connectionId, target); } } private IStyleConnector _styleConnector; private IComponentConnector _componentConnector; } } // 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
- ContractNamespaceAttribute.cs
- SqlBuilder.cs
- CacheManager.cs
- Propagator.ExtentPlaceholderCreator.cs
- HostVisual.cs
- GradientSpreadMethodValidation.cs
- MarkedHighlightComponent.cs
- EventLogEntry.cs
- MeasurementDCInfo.cs
- TerminateSequenceResponse.cs
- VersionPair.cs
- AudioException.cs
- OuterGlowBitmapEffect.cs
- ListControlConvertEventArgs.cs
- CodeIterationStatement.cs
- ImageInfo.cs
- ProcessStartInfo.cs
- ExcludePathInfo.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- RectAnimationClockResource.cs
- EntityPropertyMappingAttribute.cs
- ReadWriteObjectLock.cs
- TdsValueSetter.cs
- ButtonField.cs
- DbConnectionHelper.cs
- SqlDataSourceCustomCommandEditor.cs
- EndpointDiscoveryBehavior.cs
- TiffBitmapEncoder.cs
- SqlCacheDependency.cs
- AdornerLayer.cs
- Setter.cs
- SqlBinder.cs
- FormCollection.cs
- WindowsIdentity.cs
- Select.cs
- XmlEntity.cs
- Encoder.cs
- MemberInfoSerializationHolder.cs
- SettingsContext.cs
- EntityKeyElement.cs
- TextParentUndoUnit.cs
- HostedHttpContext.cs
- ASCIIEncoding.cs
- XPathItem.cs
- ValueExpressions.cs
- mda.cs
- NodeFunctions.cs
- FormViewUpdateEventArgs.cs
- ComplexObject.cs
- LineServicesCallbacks.cs
- Frame.cs
- DefaultDialogButtons.cs
- SignatureToken.cs
- BuildProvidersCompiler.cs
- ProxyWebPartManager.cs
- AttachedPropertiesService.cs
- TextPointer.cs
- FontInfo.cs
- EmptyEnumerator.cs
- ArrayWithOffset.cs
- GlyphingCache.cs
- ReferentialConstraintRoleElement.cs
- BuildProvidersCompiler.cs
- InternalBufferManager.cs
- XDRSchema.cs
- ColorConvertedBitmap.cs
- DbConnectionHelper.cs
- BitmapEncoder.cs
- XNameTypeConverter.cs
- ViewGenerator.cs
- AutoGeneratedField.cs
- TraceSection.cs
- WebPartConnectionsConnectVerb.cs
- webclient.cs
- HtmlCalendarAdapter.cs
- FieldNameLookup.cs
- SystemDiagnosticsSection.cs
- PeerObject.cs
- Encoder.cs
- SessionMode.cs
- XPathException.cs
- PackageRelationshipCollection.cs
- TableChangeProcessor.cs
- StorageEntityContainerMapping.cs
- DESCryptoServiceProvider.cs
- StateManagedCollection.cs
- TaskDesigner.cs
- HttpHandlersSection.cs
- HyperLinkField.cs
- MenuItemStyle.cs
- Win32Native.cs
- SolidBrush.cs
- SecurityKeyEntropyMode.cs
- Soap.cs
- TableSectionStyle.cs
- PocoEntityKeyStrategy.cs
- PeerNodeAddress.cs
- Int32AnimationUsingKeyFrames.cs
- ADRoleFactory.cs
- Compiler.cs