Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Markup / TemplateComponentConnector.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ExpressionVisitorHelpers.cs
- QilCloneVisitor.cs
- SystemWebCachingSectionGroup.cs
- ModelFunctionTypeElement.cs
- CanonicalizationDriver.cs
- securitycriticaldataformultiplegetandset.cs
- FormsAuthenticationCredentials.cs
- NewItemsContextMenuStrip.cs
- filewebrequest.cs
- DateTimeFormatInfoScanner.cs
- UserValidatedEventArgs.cs
- SqlRowUpdatedEvent.cs
- HttpCachePolicy.cs
- RouteUrlExpressionBuilder.cs
- SmtpCommands.cs
- WebPartTransformerCollection.cs
- Rotation3D.cs
- ToolStripCodeDomSerializer.cs
- CurrentTimeZone.cs
- ElementHostPropertyMap.cs
- ByteStack.cs
- SessionStateContainer.cs
- OleServicesContext.cs
- FlowThrottle.cs
- OutArgumentConverter.cs
- UmAlQuraCalendar.cs
- __Error.cs
- ConnectionPoint.cs
- SqlCacheDependency.cs
- LinkedDataMemberFieldEditor.cs
- StrongNameHelpers.cs
- ReadOnlyObservableCollection.cs
- Pointer.cs
- GenericEnumConverter.cs
- HttpConfigurationContext.cs
- XmlSerializationWriter.cs
- PolicyReader.cs
- _ScatterGatherBuffers.cs
- DocumentXmlWriter.cs
- BinaryNode.cs
- TerminatorSinks.cs
- RawTextInputReport.cs
- TraceContextEventArgs.cs
- MetadataUtilsSmi.cs
- ReadOnlyKeyedCollection.cs
- XmlReflectionImporter.cs
- MenuBase.cs
- TimelineClockCollection.cs
- Symbol.cs
- XdrBuilder.cs
- EventDescriptor.cs
- DATA_BLOB.cs
- DESCryptoServiceProvider.cs
- UpdateDelegates.Generated.cs
- TextTreeTextNode.cs
- SequentialWorkflowHeaderFooter.cs
- DbProviderConfigurationHandler.cs
- DataStreamFromComStream.cs
- CompiledELinqQueryState.cs
- FrameworkReadOnlyPropertyMetadata.cs
- HttpAsyncResult.cs
- GridEntry.cs
- RelationshipType.cs
- GenericWebPart.cs
- EventHandlers.cs
- XmlNamespaceMapping.cs
- ServiceHostingEnvironment.cs
- PathGeometry.cs
- ScaleTransform3D.cs
- BeginEvent.cs
- StringFreezingAttribute.cs
- AccessViolationException.cs
- PngBitmapDecoder.cs
- CTreeGenerator.cs
- SuppressMergeCheckAttribute.cs
- ObjectQuery.cs
- FillBehavior.cs
- QueryGenerator.cs
- TheQuery.cs
- ValidationManager.cs
- TextTreeUndoUnit.cs
- DataServiceEntityAttribute.cs
- HttpApplicationFactory.cs
- ClientUrlResolverWrapper.cs
- ConstructorArgumentAttribute.cs
- ConstraintConverter.cs
- CodeDelegateInvokeExpression.cs
- DataGridViewHeaderCell.cs
- ControlParameter.cs
- HostedElements.cs
- AsyncOperationContext.cs
- CanonicalFontFamilyReference.cs
- StylusOverProperty.cs
- DynamicPhysicalDiscoSearcher.cs
- Resources.Designer.cs
- SqlUserDefinedTypeAttribute.cs
- ConsoleTraceListener.cs
- NotifyCollectionChangedEventArgs.cs
- ByteAnimation.cs
- Soap12ProtocolImporter.cs