Code:
/ 4.0 / 4.0 / 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. 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
- QilScopedVisitor.cs
- DbExpressionRules.cs
- RequestCache.cs
- DataGridViewCellStyleContentChangedEventArgs.cs
- ProcessManager.cs
- StaticResourceExtension.cs
- ListControlConvertEventArgs.cs
- UnsettableComboBox.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- SignatureToken.cs
- FixedFlowMap.cs
- safemediahandle.cs
- UnsafeNativeMethods.cs
- ToolStripMenuItem.cs
- PostBackOptions.cs
- SmtpCommands.cs
- EntityDataSource.cs
- CodeArrayIndexerExpression.cs
- KeyConverter.cs
- BulletedList.cs
- DocumentPageTextView.cs
- RedistVersionInfo.cs
- XamlPoint3DCollectionSerializer.cs
- WriteFileContext.cs
- SspiWrapper.cs
- TCPListener.cs
- BulletedListDesigner.cs
- DataPagerFieldItem.cs
- EpmAttributeNameBuilder.cs
- RIPEMD160Managed.cs
- ServiceReference.cs
- SubMenuStyle.cs
- SelectingProviderEventArgs.cs
- GuidelineSet.cs
- BooleanStorage.cs
- DataGridCellClipboardEventArgs.cs
- RemotingServices.cs
- ContextMenuService.cs
- PeerNameResolver.cs
- ErrorFormatterPage.cs
- FileDialog.cs
- SoapIncludeAttribute.cs
- ShaderEffect.cs
- XmlTextReader.cs
- AsyncDataRequest.cs
- GridEntry.cs
- InsufficientMemoryException.cs
- VisualTarget.cs
- HandleCollector.cs
- CircleHotSpot.cs
- SmtpMail.cs
- FileLogRecord.cs
- LineBreak.cs
- CodeAssignStatement.cs
- FixedDocumentSequencePaginator.cs
- Int32CollectionConverter.cs
- _FtpDataStream.cs
- ArraySegment.cs
- DataTableMappingCollection.cs
- ArcSegment.cs
- DataSourceViewSchemaConverter.cs
- MSG.cs
- Subset.cs
- SqlPersonalizationProvider.cs
- MatrixTransform3D.cs
- ToolStripSettings.cs
- PointConverter.cs
- ObjectSet.cs
- Rules.cs
- _OSSOCK.cs
- HwndTarget.cs
- ColumnHeader.cs
- ThicknessKeyFrameCollection.cs
- HuffmanTree.cs
- UrlMappingsModule.cs
- ViewCellSlot.cs
- CounterCreationDataCollection.cs
- SafeTimerHandle.cs
- ThreadAbortException.cs
- XmlArrayItemAttribute.cs
- BuildManager.cs
- xsdvalidator.cs
- ServiceModelActivity.cs
- ADMembershipProvider.cs
- IdentityReference.cs
- RegexFCD.cs
- GenericEnumerator.cs
- SpellerHighlightLayer.cs
- Content.cs
- BindingOperations.cs
- XamlSerializerUtil.cs
- ExtensionWindowHeader.cs
- FocusChangedEventArgs.cs
- PriorityChain.cs
- ContextBase.cs
- RequestCache.cs
- NonPrimarySelectionGlyph.cs
- ObjectManager.cs
- Models.cs
- JournalEntryListConverter.cs