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
- HTTPNotFoundHandler.cs
- RedirectionProxy.cs
- ComplexType.cs
- ModelService.cs
- CustomTypeDescriptor.cs
- ModifierKeysValueSerializer.cs
- ValueUnavailableException.cs
- ViewStateModeByIdAttribute.cs
- EventMappingSettingsCollection.cs
- ElementHostPropertyMap.cs
- FileNameEditor.cs
- SqlUtils.cs
- BindingValueChangedEventArgs.cs
- DocumentPage.cs
- EnvelopedPkcs7.cs
- ConfigurationManagerInternalFactory.cs
- RegexGroup.cs
- StateDesigner.Helpers.cs
- GridViewRowCollection.cs
- FormViewInsertEventArgs.cs
- HashMembershipCondition.cs
- ActiveXContainer.cs
- DocumentViewerBaseAutomationPeer.cs
- DocumentApplication.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- MethodCallConverter.cs
- Span.cs
- OraclePermissionAttribute.cs
- CreateUserWizardStep.cs
- MultiView.cs
- PolyQuadraticBezierSegment.cs
- ServiceContractViewControl.cs
- BamlMapTable.cs
- UnsafeNativeMethods.cs
- HttpCookieCollection.cs
- TaiwanLunisolarCalendar.cs
- XappLauncher.cs
- ShapeTypeface.cs
- EncodingNLS.cs
- HttpListenerContext.cs
- DataKeyArray.cs
- DataFieldEditor.cs
- ShortcutKeysEditor.cs
- SystemFonts.cs
- ReturnValue.cs
- WhitespaceSignificantCollectionAttribute.cs
- _ListenerResponseStream.cs
- WindowsListViewGroupHelper.cs
- LogAppendAsyncResult.cs
- ListItemConverter.cs
- GenericXmlSecurityToken.cs
- AuthenticationManager.cs
- Inflater.cs
- NetworkInterface.cs
- XhtmlConformanceSection.cs
- EasingKeyFrames.cs
- propertyentry.cs
- EventLogEntry.cs
- SpotLight.cs
- SerializationBinder.cs
- SettingsProperty.cs
- NetSectionGroup.cs
- AggregateNode.cs
- IntegerValidator.cs
- __ComObject.cs
- ConnectorRouter.cs
- TabControlCancelEvent.cs
- hresults.cs
- GeometryCollection.cs
- ListBoxItemAutomationPeer.cs
- FontInfo.cs
- DataGridViewButtonCell.cs
- SqlWebEventProvider.cs
- InputBinder.cs
- WebScriptMetadataMessageEncodingBindingElement.cs
- MenuBindingsEditorForm.cs
- HostExecutionContextManager.cs
- DefaultMemberAttribute.cs
- rsa.cs
- DrawingCollection.cs
- TextEditorCopyPaste.cs
- SQLDoubleStorage.cs
- DataBindingExpressionBuilder.cs
- XmlSchemaAnnotated.cs
- CodeAttributeDeclaration.cs
- FontInfo.cs
- DataSet.cs
- Internal.cs
- Overlapped.cs
- PropertyConverter.cs
- ConnectionPointCookie.cs
- CodeTypeOfExpression.cs
- StandardCommands.cs
- EmptyStringExpandableObjectConverter.cs
- WindowShowOrOpenTracker.cs
- ParameterBinding.cs
- BamlBinaryWriter.cs
- AlternateView.cs
- Cloud.cs
- TypeToken.cs