Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SecuritySessionFilter.cs
- TypeUnloadedException.cs
- CreateWorkflowOwnerCommand.cs
- OpCodes.cs
- ArithmeticException.cs
- InstanceBehavior.cs
- RepeaterItemEventArgs.cs
- RecognizedPhrase.cs
- PlaceHolder.cs
- GestureRecognitionResult.cs
- OlePropertyStructs.cs
- exports.cs
- WebDescriptionAttribute.cs
- AssemblyName.cs
- WindowsFormsEditorServiceHelper.cs
- SecurityChannelFaultConverter.cs
- ThousandthOfEmRealDoubles.cs
- Style.cs
- DayRenderEvent.cs
- ExcCanonicalXml.cs
- DBCSCodePageEncoding.cs
- XmlSchemaGroup.cs
- TabControl.cs
- _ConnectStream.cs
- BitmapEffectDrawing.cs
- QilScopedVisitor.cs
- AssemblyUtil.cs
- login.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SizeConverter.cs
- IconConverter.cs
- DataGridParentRows.cs
- MethodBuilder.cs
- FixedSOMTable.cs
- TextReader.cs
- DataGridViewCellFormattingEventArgs.cs
- SqlResolver.cs
- InvalidChannelBindingException.cs
- XmlBoundElement.cs
- RuntimeHandles.cs
- sqlser.cs
- LookupNode.cs
- TableStyle.cs
- ValidatingReaderNodeData.cs
- ThicknessAnimationUsingKeyFrames.cs
- UdpTransportSettings.cs
- SymmetricKeyWrap.cs
- SqlUtil.cs
- SerializerProvider.cs
- GeneralTransform3D.cs
- AnnouncementEndpointElement.cs
- ColumnPropertiesGroup.cs
- PlainXmlWriter.cs
- TablePattern.cs
- LogExtent.cs
- MailBnfHelper.cs
- CodeSubDirectoriesCollection.cs
- TemplatedMailWebEventProvider.cs
- InlineObject.cs
- COAUTHINFO.cs
- CqlErrorHelper.cs
- TypeDescriptorContext.cs
- SqlException.cs
- AttributeCollection.cs
- AsyncOperationManager.cs
- MessageQueue.cs
- PageThemeBuildProvider.cs
- GenericUriParser.cs
- WebMessageEncodingBindingElement.cs
- LinkButton.cs
- FixedPageStructure.cs
- SegmentInfo.cs
- HttpCacheVary.cs
- CookieHandler.cs
- webbrowsersite.cs
- BitmapScalingModeValidation.cs
- QilCloneVisitor.cs
- ControlAdapter.cs
- MD5CryptoServiceProvider.cs
- LambdaCompiler.Generated.cs
- WrappingXamlSchemaContext.cs
- EnumValAlphaComparer.cs
- HwndSource.cs
- XPathDocumentNavigator.cs
- UInt16Converter.cs
- ServerTooBusyException.cs
- WhitespaceReader.cs
- SessionEndingCancelEventArgs.cs
- AuthorizationSection.cs
- DbProviderSpecificTypePropertyAttribute.cs
- CreateDataSourceDialog.cs
- ClientCredentialsSecurityTokenManager.cs
- EdmTypeAttribute.cs
- DataRowExtensions.cs
- TreeView.cs
- DocumentPage.cs
- SelectionChangedEventArgs.cs
- RequestCacheManager.cs
- SessionStateContainer.cs
- DragDrop.cs