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
- CellTreeSimplifier.cs
- MarginCollapsingState.cs
- ViewGenerator.cs
- QueryFunctions.cs
- MailSettingsSection.cs
- OdbcConnectionOpen.cs
- Cell.cs
- DataGridViewColumnHeaderCell.cs
- TaiwanLunisolarCalendar.cs
- DoubleAnimationClockResource.cs
- ConstraintEnumerator.cs
- WsatConfiguration.cs
- MulticastDelegate.cs
- OperationContractGenerationContext.cs
- BrowserDefinitionCollection.cs
- SettingsProperty.cs
- Misc.cs
- CalculatedColumn.cs
- ProviderCollection.cs
- ItemsPanelTemplate.cs
- TemplateColumn.cs
- DesignerHost.cs
- ObservableCollection.cs
- XmlSchemaProviderAttribute.cs
- XPathNodeList.cs
- CalendarSelectionChangedEventArgs.cs
- XmlNavigatorStack.cs
- Decimal.cs
- SiteMapNodeCollection.cs
- SystemIPv4InterfaceProperties.cs
- WizardStepBase.cs
- ReferentialConstraint.cs
- DefaultWorkflowTransactionService.cs
- SynchronizationContext.cs
- ChildrenQuery.cs
- XmlSchemaSimpleContent.cs
- PrePrepareMethodAttribute.cs
- Compensation.cs
- SqlUnionizer.cs
- RowToFieldTransformer.cs
- SymbolEqualComparer.cs
- XmlEventCache.cs
- TypeLoadException.cs
- TitleStyle.cs
- precedingquery.cs
- GeneralTransform3DTo2DTo3D.cs
- CapabilitiesState.cs
- RawAppCommandInputReport.cs
- EntityViewContainer.cs
- RSAPKCS1SignatureDeformatter.cs
- EventlogProvider.cs
- TrustManager.cs
- AsyncParams.cs
- GridEntryCollection.cs
- Visual3D.cs
- MarkupWriter.cs
- HtmlElementErrorEventArgs.cs
- Parser.cs
- ListViewTableRow.cs
- Matrix.cs
- DataGridViewElement.cs
- BlockCollection.cs
- XmlNamespaceDeclarationsAttribute.cs
- SqlBooleanizer.cs
- WebServiceHandlerFactory.cs
- Timer.cs
- GeneralTransformCollection.cs
- MethodRental.cs
- WorkflowOperationContext.cs
- ObjectTypeMapping.cs
- PathFigureCollection.cs
- DataGridViewTextBoxCell.cs
- Mapping.cs
- designeractionbehavior.cs
- SafeFileMappingHandle.cs
- DataGridToolTip.cs
- DropShadowBitmapEffect.cs
- ParameterBinding.cs
- OnOperation.cs
- XmlConvert.cs
- Schema.cs
- FactoryRecord.cs
- Matrix3D.cs
- EditCommandColumn.cs
- lengthconverter.cs
- BidPrivateBase.cs
- TimeoutTimer.cs
- FormViewUpdatedEventArgs.cs
- SqlDataSourceCache.cs
- XmlComplianceUtil.cs
- WinInet.cs
- HttpResponseInternalWrapper.cs
- SiteMapPath.cs
- FileSystemEventArgs.cs
- X509AsymmetricSecurityKey.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- TableAdapterManagerHelper.cs
- XmlSerializationWriter.cs
- RouteItem.cs
- SrgsElementFactoryCompiler.cs