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
- CodeAssignStatement.cs
- PowerModeChangedEventArgs.cs
- ExpressionNode.cs
- TreeNodeCollection.cs
- RenderData.cs
- EventLogQuery.cs
- Module.cs
- NamedPipeTransportManager.cs
- XhtmlTextWriter.cs
- ReaderWriterLockSlim.cs
- OutputScope.cs
- ActionItem.cs
- PageCache.cs
- _SslStream.cs
- MulticastDelegate.cs
- HasCopySemanticsAttribute.cs
- AccessText.cs
- RbTree.cs
- log.cs
- CryptoApi.cs
- SaveWorkflowCommand.cs
- CodeExpressionStatement.cs
- TextEditorTables.cs
- ImageCodecInfoPrivate.cs
- ProcessHostConfigUtils.cs
- AnimationLayer.cs
- CheckBoxPopupAdapter.cs
- ProcessInputEventArgs.cs
- ObjectReaderCompiler.cs
- CurrentChangingEventArgs.cs
- WebPartDescription.cs
- WebPartDeleteVerb.cs
- _emptywebproxy.cs
- DbConnectionPoolIdentity.cs
- TextEffect.cs
- EasingQuaternionKeyFrame.cs
- TypeExtension.cs
- SiteMapProvider.cs
- QueryCursorEventArgs.cs
- EnlistmentTraceIdentifier.cs
- GrammarBuilderDictation.cs
- AppSettingsExpressionBuilder.cs
- WebConfigurationHost.cs
- ZipIOLocalFileDataDescriptor.cs
- RelationshipDetailsRow.cs
- DbConnectionFactory.cs
- ByteStorage.cs
- CategoryGridEntry.cs
- DataTrigger.cs
- QuaternionAnimationBase.cs
- NativeCompoundFileAPIs.cs
- DbUpdateCommandTree.cs
- ToolCreatedEventArgs.cs
- PerformanceCounterPermissionAttribute.cs
- DataGridColumnsPage.cs
- DataGridViewAutoSizeModeEventArgs.cs
- OrderPreservingPipeliningSpoolingTask.cs
- SessionIDManager.cs
- PaintEvent.cs
- StickyNoteHelper.cs
- AssociationTypeEmitter.cs
- DataTableMappingCollection.cs
- MediaContext.cs
- WebUtility.cs
- SQLDoubleStorage.cs
- XsdBuildProvider.cs
- ImageListUtils.cs
- DbConnectionFactory.cs
- RankException.cs
- ResourceProperty.cs
- Addressing.cs
- BamlBinaryWriter.cs
- TimeSpanParse.cs
- SeekableReadStream.cs
- ReadOnlyHierarchicalDataSource.cs
- PenLineCapValidation.cs
- DataTableNewRowEvent.cs
- HttpFileCollection.cs
- VisualStyleElement.cs
- HtmlForm.cs
- sqlinternaltransaction.cs
- HierarchicalDataBoundControl.cs
- XmlSchemaDatatype.cs
- ProxyFragment.cs
- PreProcessor.cs
- Frame.cs
- FtpWebRequest.cs
- SqlCacheDependencyDatabaseCollection.cs
- PathParser.cs
- ByteStreamGeometryContext.cs
- CaseExpr.cs
- DefaultHttpHandler.cs
- SymbolType.cs
- _RequestCacheProtocol.cs
- StandardBindingCollectionElement.cs
- BorderGapMaskConverter.cs
- ContextMenuAutomationPeer.cs
- TableCellCollection.cs
- CallSite.cs
- DefaultShape.cs