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
- ChannelPoolSettings.cs
- SoapHeaderException.cs
- XmlSchemaValidator.cs
- SaveFileDialog.cs
- ResourceBinder.cs
- TextAutomationPeer.cs
- Attributes.cs
- HostedBindingBehavior.cs
- InputProcessorProfiles.cs
- RemotingConfiguration.cs
- ScrollItemPattern.cs
- D3DImage.cs
- Relationship.cs
- EntityClassGenerator.cs
- MoveSizeWinEventHandler.cs
- InputBinding.cs
- TransactionInterop.cs
- List.cs
- PointKeyFrameCollection.cs
- RadioButtonAutomationPeer.cs
- AllMembershipCondition.cs
- XMLUtil.cs
- LabelInfo.cs
- ItemsPanelTemplate.cs
- QilGenerator.cs
- SqlHelper.cs
- BitmapEffect.cs
- VariantWrapper.cs
- CommonXSendMessage.cs
- IsolationInterop.cs
- DataPagerFieldCollection.cs
- BaseProcessor.cs
- Panel.cs
- XmlExpressionDumper.cs
- DataGridParentRows.cs
- METAHEADER.cs
- ComponentFactoryHelpers.cs
- MultipleViewPatternIdentifiers.cs
- TextTreeInsertUndoUnit.cs
- CompareInfo.cs
- ProfilePropertySettings.cs
- WindowsScroll.cs
- AstTree.cs
- ForEachAction.cs
- Directory.cs
- WebPartDisplayMode.cs
- Util.cs
- NameTable.cs
- IgnoreSectionHandler.cs
- CapiSafeHandles.cs
- DeferredSelectedIndexReference.cs
- SortDescription.cs
- TextParagraph.cs
- MouseGestureConverter.cs
- mactripleDES.cs
- CompilerError.cs
- X509CertificateStore.cs
- Win32PrintDialog.cs
- RevocationPoint.cs
- ImageField.cs
- MouseActionConverter.cs
- MappedMetaModel.cs
- DocumentViewerConstants.cs
- WindowsFormsHost.cs
- ProcessStartInfo.cs
- ApplicationDirectoryMembershipCondition.cs
- UserControl.cs
- FrameworkRichTextComposition.cs
- PickBranch.cs
- XmlFormatReaderGenerator.cs
- MulticastNotSupportedException.cs
- Separator.cs
- KeyboardDevice.cs
- SqlNodeAnnotations.cs
- Point3DCollection.cs
- UIElementHelper.cs
- PropertyCollection.cs
- CanonicalFontFamilyReference.cs
- BaseCodeDomTreeGenerator.cs
- XmlSchemaSimpleTypeUnion.cs
- ArrayElementGridEntry.cs
- TextElementCollection.cs
- ContextDataSource.cs
- Models.cs
- Util.cs
- DataGridState.cs
- BaseCodePageEncoding.cs
- CodeTypeParameter.cs
- ContextBase.cs
- StickyNoteHelper.cs
- ColorTransformHelper.cs
- EventHandlersDesigner.cs
- CodeEventReferenceExpression.cs
- TableStyle.cs
- QilXmlWriter.cs
- ListParagraph.cs
- FileEnumerator.cs
- AnchorEditor.cs
- localization.cs
- DodSequenceMerge.cs