Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / ContentOperations.cs / 1305600 / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TaskForm.cs
- PrintEvent.cs
- SafeViewOfFileHandle.cs
- SqlConnection.cs
- XsdDuration.cs
- EntityDescriptor.cs
- PrintEvent.cs
- JsonWriter.cs
- GradientStop.cs
- ProfilePropertySettingsCollection.cs
- SafeThreadHandle.cs
- MsmqAppDomainProtocolHandler.cs
- ProvidersHelper.cs
- _FtpDataStream.cs
- SkinBuilder.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- AttachedAnnotation.cs
- BuilderPropertyEntry.cs
- ToolBarOverflowPanel.cs
- PresentationTraceSources.cs
- UnsettableComboBox.cs
- TypeUnloadedException.cs
- ConfigDefinitionUpdates.cs
- NativeCppClassAttribute.cs
- Set.cs
- HandoffBehavior.cs
- ping.cs
- TypeReference.cs
- PeerToPeerException.cs
- MapPathBasedVirtualPathProvider.cs
- PasswordBoxAutomationPeer.cs
- StorageMappingFragment.cs
- InheritanceContextChangedEventManager.cs
- ConfigXmlDocument.cs
- TableItemStyle.cs
- Imaging.cs
- BufferModesCollection.cs
- FileEnumerator.cs
- FragmentQueryKB.cs
- documentsequencetextpointer.cs
- GuidelineSet.cs
- NetworkInterface.cs
- CommandLineParser.cs
- DataGridHeaderBorder.cs
- LoginDesigner.cs
- SimpleHandlerFactory.cs
- PeerNearMe.cs
- ProfileManager.cs
- TableParagraph.cs
- UnsafeNativeMethods.cs
- FullTextLine.cs
- PointAnimationClockResource.cs
- SymDocumentType.cs
- WebPartConnection.cs
- PolicyChain.cs
- DataPagerFieldCollection.cs
- DetailsViewUpdateEventArgs.cs
- SubpageParagraph.cs
- DesignerActionMethodItem.cs
- InstallerTypeAttribute.cs
- _HeaderInfoTable.cs
- XmlReturnReader.cs
- Msec.cs
- ChameleonKey.cs
- SafeViewOfFileHandle.cs
- NamedElement.cs
- PipeStream.cs
- StyleSheet.cs
- Binding.cs
- SystemIcmpV4Statistics.cs
- TransformerTypeCollection.cs
- TextAdaptor.cs
- LoaderAllocator.cs
- Accessors.cs
- RoleManagerSection.cs
- PasswordBoxAutomationPeer.cs
- MeasureData.cs
- EntityConnectionStringBuilder.cs
- OuterGlowBitmapEffect.cs
- MetadataCache.cs
- ProxyGenerator.cs
- ControlEvent.cs
- CompositeCollectionView.cs
- ObjectItemAttributeAssemblyLoader.cs
- _TLSstream.cs
- XmlSchemaImport.cs
- SafeThreadHandle.cs
- PropertyChangedEventManager.cs
- PageOrientation.cs
- PageBuildProvider.cs
- BitmapMetadataBlob.cs
- DbConnectionInternal.cs
- AssociationSetEnd.cs
- Properties.cs
- FieldNameLookup.cs
- CreateRefExpr.cs
- ComponentResourceKeyConverter.cs
- XmlSchemaProviderAttribute.cs
- BitmapSource.cs
- EntryWrittenEventArgs.cs