Code:
/ 4.0 / 4.0 / 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. /****************************************************************************\ * * 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
- CodeExpressionRuleDeclaration.cs
- XmlNotation.cs
- HttpCookie.cs
- ColumnTypeConverter.cs
- RequestCacheValidator.cs
- TransactionContextValidator.cs
- CodeLinePragma.cs
- Point3DIndependentAnimationStorage.cs
- SettingsPropertyNotFoundException.cs
- RepeaterDesigner.cs
- UniqueConstraint.cs
- CustomDictionarySources.cs
- CodeConditionStatement.cs
- IssuedTokenServiceCredential.cs
- DefaultTraceListener.cs
- DynamicResourceExtension.cs
- DownloadProgressEventArgs.cs
- ImageFormatConverter.cs
- ButtonBaseAutomationPeer.cs
- XmlProcessingInstruction.cs
- ProgramPublisher.cs
- NamespaceListProperty.cs
- DiscoveryInnerClientAdhoc11.cs
- StrokeDescriptor.cs
- NavigationService.cs
- Attributes.cs
- WebSysDisplayNameAttribute.cs
- BatchParser.cs
- HtmlInputSubmit.cs
- SQLBytesStorage.cs
- HtmlInputReset.cs
- TextDecorationLocationValidation.cs
- LingerOption.cs
- CodeTypeReferenceExpression.cs
- TextTreeTextElementNode.cs
- ByteFacetDescriptionElement.cs
- FormatConvertedBitmap.cs
- JsonCollectionDataContract.cs
- DbConnectionClosed.cs
- PreservationFileWriter.cs
- OciLobLocator.cs
- BasicHttpMessageSecurity.cs
- InitializationEventAttribute.cs
- ModifierKeysValueSerializer.cs
- QueryGeneratorBase.cs
- BeginStoryboard.cs
- SqlLiftIndependentRowExpressions.cs
- WebHttpSecurity.cs
- ItemsControlAutomationPeer.cs
- LocatorGroup.cs
- EntityDesignPluralizationHandler.cs
- KeyEvent.cs
- DataGridViewColumn.cs
- HandledEventArgs.cs
- BuildResultCache.cs
- XmlDictionaryString.cs
- IsolatedStoragePermission.cs
- Rules.cs
- OleDbInfoMessageEvent.cs
- MetadataConversionError.cs
- PerfCounterSection.cs
- StreamingContext.cs
- WindowsEditBox.cs
- SqlDataSource.cs
- Panel.cs
- ControlBuilder.cs
- ColorMatrix.cs
- ControlBindingsCollection.cs
- GestureRecognitionResult.cs
- NamespaceInfo.cs
- TextWriterEngine.cs
- Types.cs
- UrlMapping.cs
- SuppressMessageAttribute.cs
- ListViewCommandEventArgs.cs
- SamlSubject.cs
- DataTableNameHandler.cs
- SafeHandle.cs
- RemotingConfigParser.cs
- MimeReflector.cs
- VScrollProperties.cs
- SqlPersonalizationProvider.cs
- DesignerObject.cs
- Journaling.cs
- ShaperBuffers.cs
- SafeNativeMethods.cs
- NotifyParentPropertyAttribute.cs
- DoubleCollectionConverter.cs
- SystemIcmpV6Statistics.cs
- ParameterCollection.cs
- MachineKeyValidationConverter.cs
- URLBuilder.cs
- DBPropSet.cs
- Assembly.cs
- SqlDataSourceStatusEventArgs.cs
- DependencyPropertyValueSerializer.cs
- Operator.cs
- HtmlElementEventArgs.cs
- TextFindEngine.cs
- HtmlControlPersistable.cs