Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / ContentOperations.cs / 1 / ContentOperations.cs
namespace System.Windows { ////// This interface defines the common methods and services available from a ContentElement. /// public static class ContentOperations { ////// Get the Visual parent of this ContentElement. /// public static DependencyObject GetParent(ContentElement reference) { if(reference == null) { throw new ArgumentNullException("reference"); } return reference._parent; } ////// Set the Visual parent of this ContentElement. /// ////// This is different than Visuals. For Visuals, you have to /// Add/Remove the visual from a children collection to change /// the parent. I think it is a better model, but I don't /// know if we want to expose a full children collection for /// content elements. /// public static void SetParent(ContentElement reference, DependencyObject parent) { if(reference == null) { throw new ArgumentNullException("reference"); } DependencyObject oldParent = reference._parent; reference._parent = parent; // Raise content parent changed notification reference.OnContentParentChanged(oldParent); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Windows { ////// This interface defines the common methods and services available from a ContentElement. /// public static class ContentOperations { ////// Get the Visual parent of this ContentElement. /// public static DependencyObject GetParent(ContentElement reference) { if(reference == null) { throw new ArgumentNullException("reference"); } return reference._parent; } ////// Set the Visual parent of this ContentElement. /// ////// This is different than Visuals. For Visuals, you have to /// Add/Remove the visual from a children collection to change /// the parent. I think it is a better model, but I don't /// know if we want to expose a full children collection for /// content elements. /// public static void SetParent(ContentElement reference, DependencyObject parent) { if(reference == null) { throw new ArgumentNullException("reference"); } DependencyObject oldParent = reference._parent; reference._parent = parent; // Raise content parent changed notification reference.OnContentParentChanged(oldParent); } } } // 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
- FilterException.cs
- WebHeaderCollection.cs
- StopStoryboard.cs
- PictureBox.cs
- CheckoutException.cs
- CharUnicodeInfo.cs
- IteratorFilter.cs
- PersonalizablePropertyEntry.cs
- Visual3DCollection.cs
- GridSplitterAutomationPeer.cs
- QilStrConcatenator.cs
- MultiPartWriter.cs
- TagMapInfo.cs
- EventRecordWrittenEventArgs.cs
- HttpApplicationStateBase.cs
- SecurityChannelFactory.cs
- CollectionContainer.cs
- ButtonPopupAdapter.cs
- RangeValuePatternIdentifiers.cs
- TableProviderWrapper.cs
- XmlAttributeAttribute.cs
- WizardPanel.cs
- TdsParserStaticMethods.cs
- SQLMoney.cs
- XmlSchemaParticle.cs
- PrivilegeNotHeldException.cs
- ColumnBinding.cs
- UserNamePasswordValidationMode.cs
- SecurityElement.cs
- MarshalByRefObject.cs
- XamlWrappingReader.cs
- _Connection.cs
- SynchronousSendBindingElement.cs
- EventMappingSettings.cs
- AccessKeyManager.cs
- ScriptResourceHandler.cs
- TimeSpanValidatorAttribute.cs
- HtmlInputText.cs
- TrustDriver.cs
- MeshGeometry3D.cs
- ContainerActivationHelper.cs
- XmlMembersMapping.cs
- ASCIIEncoding.cs
- TemplateFactory.cs
- InternalConfigRoot.cs
- CompressStream.cs
- Attachment.cs
- CodeActivityMetadata.cs
- RelationshipEndMember.cs
- AutoGeneratedField.cs
- OleStrCAMarshaler.cs
- ListSortDescription.cs
- LingerOption.cs
- ContextDataSource.cs
- AuthStoreRoleProvider.cs
- VisualStateManager.cs
- DataRecord.cs
- SQLMoneyStorage.cs
- DataControlField.cs
- AssociationTypeEmitter.cs
- PersonalizationStateInfo.cs
- FilterElement.cs
- HebrewCalendar.cs
- ContentTextAutomationPeer.cs
- OdbcConnectionStringbuilder.cs
- ReadOnlyHierarchicalDataSource.cs
- ResolveNameEventArgs.cs
- ValuePatternIdentifiers.cs
- Geometry3D.cs
- SymbolType.cs
- SingleSelectRootGridEntry.cs
- ClickablePoint.cs
- UnsafeNativeMethods.cs
- ScrollContentPresenter.cs
- SimpleNameService.cs
- ExpressionReplacer.cs
- COM2ExtendedTypeConverter.cs
- CategoryNameCollection.cs
- HTTPNotFoundHandler.cs
- AccessText.cs
- SqlCharStream.cs
- ThreadPool.cs
- HGlobalSafeHandle.cs
- DataGridAddNewRow.cs
- RewritingSimplifier.cs
- NativeMethods.cs
- Route.cs
- BaseComponentEditor.cs
- ProjectionCamera.cs
- DocumentCollection.cs
- Comparer.cs
- RequiredFieldValidator.cs
- PersonalizationProviderHelper.cs
- CheckPair.cs
- SafeNativeMethodsOther.cs
- RuntimeComponentFilter.cs
- AuthenticationServiceManager.cs
- IOThreadTimer.cs
- KeyValuePairs.cs
- DbMetaDataCollectionNames.cs