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
- DesignOnlyAttribute.cs
- HttpStreamXmlDictionaryReader.cs
- TdsParserStateObject.cs
- StylusPointProperties.cs
- ItemList.cs
- BitmapImage.cs
- DecimalSumAggregationOperator.cs
- ISO2022Encoding.cs
- PersianCalendar.cs
- TextEditorCopyPaste.cs
- WindowsListViewItemStartMenu.cs
- EventLogEntryCollection.cs
- SqlNotificationRequest.cs
- ArithmeticLiteral.cs
- SourceSwitch.cs
- RegexCharClass.cs
- CanonicalFontFamilyReference.cs
- CodeRegionDirective.cs
- GreenMethods.cs
- Pen.cs
- HitTestDrawingContextWalker.cs
- QueryIntervalOp.cs
- EtwTrackingBehaviorElement.cs
- UrlMappingsModule.cs
- UIAgentInitializationException.cs
- Frame.cs
- DbCommandTree.cs
- ClientSettingsSection.cs
- FileDialogCustomPlace.cs
- TextContainer.cs
- ClientRolePrincipal.cs
- ObjectReferenceStack.cs
- BaseCodePageEncoding.cs
- MonthChangedEventArgs.cs
- HwndStylusInputProvider.cs
- CroppedBitmap.cs
- TextSearch.cs
- VirtualPathUtility.cs
- HtmlTableRowCollection.cs
- HttpAsyncResult.cs
- TextBreakpoint.cs
- EntityType.cs
- ToolStripDropTargetManager.cs
- DataGridViewColumnCollection.cs
- MenuScrollingVisibilityConverter.cs
- ClientTarget.cs
- SystemInfo.cs
- PreviewPrintController.cs
- BufferedOutputStream.cs
- CallContext.cs
- ConnectivityStatus.cs
- DataObjectEventArgs.cs
- RegionIterator.cs
- PkcsMisc.cs
- DBConcurrencyException.cs
- XamlPointCollectionSerializer.cs
- HtmlInputControl.cs
- PersistChildrenAttribute.cs
- PackagePartCollection.cs
- Win32SafeHandles.cs
- WebPartAuthorizationEventArgs.cs
- ContentElement.cs
- RadioButtonDesigner.cs
- OperationResponse.cs
- ToolStripItemCollection.cs
- RowToFieldTransformer.cs
- SchemaImporterExtension.cs
- TripleDES.cs
- EntityContainerAssociationSetEnd.cs
- PolicyDesigner.cs
- InteropAutomationProvider.cs
- CachedCompositeFamily.cs
- CompilerCollection.cs
- SafeCryptHandles.cs
- Mapping.cs
- Button.cs
- DefaultPropertiesToSend.cs
- HttpInputStream.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- TagPrefixCollection.cs
- ConfigurationPropertyAttribute.cs
- MouseEvent.cs
- OleAutBinder.cs
- ImmutableCollection.cs
- SizeChangedInfo.cs
- HtmlButton.cs
- SqlTriggerContext.cs
- BamlBinaryReader.cs
- HtmlButton.cs
- _IPv6Address.cs
- UnmanagedHandle.cs
- ISSmlParser.cs
- MinMaxParagraphWidth.cs
- CompilerGeneratedAttribute.cs
- ResourcePermissionBaseEntry.cs
- ArraySet.cs
- SqlError.cs
- XmlDataImplementation.cs
- LoginCancelEventArgs.cs
- Utility.cs