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
- EntityDataSourceConfigureObjectContext.cs
- HeaderedItemsControl.cs
- EntitySqlQueryState.cs
- PropertyToken.cs
- JavaScriptSerializer.cs
- Triangle.cs
- RouteParser.cs
- ImageCollectionEditor.cs
- XPathDescendantIterator.cs
- BaseTreeIterator.cs
- HttpSocketManager.cs
- SettingsPropertyCollection.cs
- BamlVersionHeader.cs
- ImmComposition.cs
- TextRangeAdaptor.cs
- SoapDocumentServiceAttribute.cs
- WindowsContainer.cs
- Decoder.cs
- DataSourceExpression.cs
- XmlReflectionMember.cs
- ComponentResourceKeyConverter.cs
- IRCollection.cs
- ParameterModifier.cs
- LineMetrics.cs
- TextDecorationCollectionConverter.cs
- TextPointer.cs
- Assert.cs
- SmtpSection.cs
- DbExpressionVisitor.cs
- CachedFontFace.cs
- EntityRecordInfo.cs
- DbConnectionClosed.cs
- TreeView.cs
- ProviderMetadata.cs
- DataGridViewSelectedColumnCollection.cs
- ObjRef.cs
- MobileSysDescriptionAttribute.cs
- DesignerWidgets.cs
- AdornerDecorator.cs
- AssertHelper.cs
- FtpWebResponse.cs
- _ContextAwareResult.cs
- cache.cs
- handlecollector.cs
- Helpers.cs
- MultiSelectRootGridEntry.cs
- RequestQueue.cs
- Animatable.cs
- TemplateFactory.cs
- SamlAttributeStatement.cs
- WebPartZoneBase.cs
- ByteKeyFrameCollection.cs
- ChildTable.cs
- basecomparevalidator.cs
- Screen.cs
- XPathItem.cs
- Serializer.cs
- DatatypeImplementation.cs
- DecoderReplacementFallback.cs
- ModelItemImpl.cs
- _SslSessionsCache.cs
- AuthorizationContext.cs
- UnsafeNativeMethods.cs
- CngKey.cs
- WebPartConnectionsCloseVerb.cs
- MobileControlPersister.cs
- SrgsElementFactoryCompiler.cs
- TreeNodeCollectionEditor.cs
- _SslSessionsCache.cs
- TrustSection.cs
- InvalidDataContractException.cs
- DataGridViewTopRowAccessibleObject.cs
- EditingContext.cs
- SqlFormatter.cs
- ResourceDisplayNameAttribute.cs
- XPathDocumentBuilder.cs
- EntityContainerEmitter.cs
- WebFaultClientMessageInspector.cs
- ClonableStack.cs
- Int32.cs
- EventArgs.cs
- LicenseManager.cs
- DateTimePicker.cs
- OdbcConnectionFactory.cs
- PagesChangedEventArgs.cs
- BuildProviderInstallComponent.cs
- XPathDescendantIterator.cs
- ConsumerConnectionPointCollection.cs
- ClientBuildManager.cs
- SQLStringStorage.cs
- ProfileSettingsCollection.cs
- Queue.cs
- SimpleHandlerFactory.cs
- SiteMapNode.cs
- EnvironmentPermission.cs
- FixedSOMFixedBlock.cs
- DesignTimeDataBinding.cs
- base64Transforms.cs
- AtomContentProperty.cs
- Decoder.cs