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
- Storyboard.cs
- ToolStripRenderer.cs
- RegexStringValidator.cs
- ExpandCollapsePattern.cs
- MatrixAnimationUsingPath.cs
- TextSyndicationContent.cs
- PenThreadWorker.cs
- ReturnType.cs
- WebPartManager.cs
- BinaryUtilClasses.cs
- TextSelectionHighlightLayer.cs
- ScalarType.cs
- TrackingServices.cs
- Int32KeyFrameCollection.cs
- BordersPage.cs
- AutomationPatternInfo.cs
- ImageSource.cs
- HyperLinkField.cs
- CompiledIdentityConstraint.cs
- SelectingProviderEventArgs.cs
- CircleEase.cs
- ReferenceSchema.cs
- DefaultTextStore.cs
- AutoScrollHelper.cs
- CollectionContainer.cs
- CodeLinePragma.cs
- MenuDesigner.cs
- DocumentAutomationPeer.cs
- UxThemeWrapper.cs
- SessionState.cs
- CompilerErrorCollection.cs
- BaseTreeIterator.cs
- AttributeCollection.cs
- securitycriticaldataformultiplegetandset.cs
- ViewGenResults.cs
- HtmlTernaryTree.cs
- StreamUpdate.cs
- MarshalByValueComponent.cs
- GenericRootAutomationPeer.cs
- HashCodeCombiner.cs
- SimpleFieldTemplateUserControl.cs
- TitleStyle.cs
- LinkArea.cs
- InfoCardSymmetricCrypto.cs
- Monitor.cs
- ImportedPolicyConversionContext.cs
- SystemTcpConnection.cs
- XamlTypeMapper.cs
- SiteMapDataSource.cs
- EventLogReader.cs
- SessionStateUtil.cs
- CorrelationScope.cs
- EarlyBoundInfo.cs
- ColorBlend.cs
- ProjectionCamera.cs
- GridViewUpdateEventArgs.cs
- HttpCacheParams.cs
- SamlSecurityToken.cs
- ConsoleTraceListener.cs
- OracleConnectionFactory.cs
- SqlCommand.cs
- ClientTargetSection.cs
- LessThanOrEqual.cs
- SqlProcedureAttribute.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- SecureUICommand.cs
- DataGridViewAutoSizeModeEventArgs.cs
- XmlILOptimizerVisitor.cs
- ThicknessAnimationUsingKeyFrames.cs
- SqlFactory.cs
- wmiprovider.cs
- XPathNodeInfoAtom.cs
- FormCollection.cs
- MsmqInputSessionChannel.cs
- ReaderContextStackData.cs
- HttpResponseMessageProperty.cs
- UrlAuthFailedErrorFormatter.cs
- Expander.cs
- LassoHelper.cs
- FontStretch.cs
- RoutedEventHandlerInfo.cs
- ClientBuildManager.cs
- EventDescriptor.cs
- _OverlappedAsyncResult.cs
- CqlBlock.cs
- ValueChangedEventManager.cs
- BitmapDownload.cs
- securestring.cs
- TextTreeRootNode.cs
- SynchronizedInputAdaptor.cs
- DataSourceControl.cs
- validationstate.cs
- VirtualDirectoryMappingCollection.cs
- _LocalDataStore.cs
- SourceElementsCollection.cs
- GiveFeedbackEventArgs.cs
- SafeCryptContextHandle.cs
- translator.cs
- MimeTypeMapper.cs
- AlignmentXValidation.cs