Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- localization.cs
- DbProviderFactory.cs
- TextRunTypographyProperties.cs
- ConfigurationPropertyCollection.cs
- WindowsTab.cs
- SqlCacheDependencySection.cs
- LayoutTable.cs
- TransactionFormatter.cs
- CellTreeSimplifier.cs
- AuthenticationModeHelper.cs
- ListView.cs
- ProfileGroupSettings.cs
- DescendentsWalker.cs
- DataSetUtil.cs
- SubpageParaClient.cs
- Package.cs
- AssemblyCollection.cs
- Binding.cs
- TransformedBitmap.cs
- MemberAccessException.cs
- TreeNodeStyleCollectionEditor.cs
- SerializationHelper.cs
- Cloud.cs
- QueueProcessor.cs
- Native.cs
- EventSetter.cs
- SourceChangedEventArgs.cs
- DataControlField.cs
- ButtonField.cs
- CharacterBufferReference.cs
- DataGridViewCellValidatingEventArgs.cs
- XmlQualifiedName.cs
- Button.cs
- ForAllOperator.cs
- HealthMonitoringSection.cs
- DesignerPainter.cs
- HttpListenerException.cs
- ServicePointManager.cs
- DependencyPropertyChangedEventArgs.cs
- Int64Animation.cs
- CustomLineCap.cs
- OdbcRowUpdatingEvent.cs
- SystemUdpStatistics.cs
- DelimitedListTraceListener.cs
- cookiecontainer.cs
- PrincipalPermission.cs
- HttpModuleCollection.cs
- OdbcEnvironment.cs
- CacheHelper.cs
- SrgsSemanticInterpretationTag.cs
- ServiceBuildProvider.cs
- TypeBuilder.cs
- versioninfo.cs
- SBCSCodePageEncoding.cs
- XmlRawWriterWrapper.cs
- WrapperSecurityCommunicationObject.cs
- TypeConverterMarkupExtension.cs
- EntitySqlQueryState.cs
- SweepDirectionValidation.cs
- FlowDocumentView.cs
- AuthenticationConfig.cs
- SrgsGrammar.cs
- ConfigurationPermission.cs
- ApplicationBuildProvider.cs
- SafeRightsManagementPubHandle.cs
- Convert.cs
- BinaryNode.cs
- ToolboxService.cs
- DocumentPaginator.cs
- PartBasedPackageProperties.cs
- FileUtil.cs
- StylusCollection.cs
- XmlHierarchyData.cs
- XamlTypeMapperSchemaContext.cs
- MonitorWrapper.cs
- ScopedKnownTypes.cs
- ExternalFile.cs
- ReceiveCompletedEventArgs.cs
- CapabilitiesState.cs
- CheckPair.cs
- DataServiceRequestOfT.cs
- DataView.cs
- EventProxy.cs
- X509UI.cs
- mongolianshape.cs
- TypedReference.cs
- DataSetUtil.cs
- SpellerStatusTable.cs
- FunctionDetailsReader.cs
- BaseDataListComponentEditor.cs
- UniqueID.cs
- WebBrowserSiteBase.cs
- SafeEventLogWriteHandle.cs
- streamingZipPartStream.cs
- TimeSpanConverter.cs
- CodeCompileUnit.cs
- ResourcesChangeInfo.cs
- ComplusTypeValidator.cs
- ViewKeyConstraint.cs
- ObjectAnimationBase.cs