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
- CultureInfo.cs
- StyleCollection.cs
- Substitution.cs
- SqlNodeTypeOperators.cs
- IdentityReference.cs
- ToolStripContainer.cs
- CommonObjectSecurity.cs
- Serializer.cs
- CompositeTypefaceMetrics.cs
- AsyncPostBackTrigger.cs
- SemanticAnalyzer.cs
- CompilationRelaxations.cs
- NavigationCommands.cs
- FlowPosition.cs
- XsltArgumentList.cs
- TdsParameterSetter.cs
- InternalDispatchObject.cs
- WmlLinkAdapter.cs
- TextTreeObjectNode.cs
- SrgsRuleRef.cs
- ReverseInheritProperty.cs
- IdentityModelStringsVersion1.cs
- AuthorizationSection.cs
- OpenTypeCommon.cs
- PeerName.cs
- InvalidOleVariantTypeException.cs
- StatusBarItem.cs
- SimpleHandlerFactory.cs
- RowToFieldTransformer.cs
- DelegatingTypeDescriptionProvider.cs
- SqlGenericUtil.cs
- TextLineResult.cs
- ScriptControlManager.cs
- ThicknessAnimation.cs
- IriParsingElement.cs
- LeftCellWrapper.cs
- SqlServer2KCompatibilityCheck.cs
- HttpInputStream.cs
- BasicCellRelation.cs
- BulletedList.cs
- MailHeaderInfo.cs
- EntityDataSourceMemberPath.cs
- OracleRowUpdatedEventArgs.cs
- AttributeTableBuilder.cs
- TextEditorLists.cs
- ForceCopyBuildProvider.cs
- bindurihelper.cs
- DatePickerAutomationPeer.cs
- DiagnosticSection.cs
- AssociationTypeEmitter.cs
- BitConverter.cs
- InvalidFilterCriteriaException.cs
- CommandLibraryHelper.cs
- Glyph.cs
- TreeViewHitTestInfo.cs
- TransportSecurityBindingElement.cs
- DataGridColumnStyleMappingNameEditor.cs
- OpCellTreeNode.cs
- JavaScriptString.cs
- SecurityCriticalDataForSet.cs
- XmlCustomFormatter.cs
- TemplateKey.cs
- FontEditor.cs
- StandardToolWindows.cs
- Dictionary.cs
- SqlCommandSet.cs
- GridLengthConverter.cs
- InProcStateClientManager.cs
- BCryptHashAlgorithm.cs
- _LazyAsyncResult.cs
- XPathParser.cs
- SamlNameIdentifierClaimResource.cs
- EventDrivenDesigner.cs
- IgnoreFileBuildProvider.cs
- ProfileEventArgs.cs
- WebPartHeaderCloseVerb.cs
- StorageEndPropertyMapping.cs
- StorageInfo.cs
- DataGridSortCommandEventArgs.cs
- SqlServices.cs
- CellParaClient.cs
- OletxDependentTransaction.cs
- PersonalizationStateInfo.cs
- HttpRuntime.cs
- ScriptReferenceEventArgs.cs
- FormsAuthenticationConfiguration.cs
- ComponentTray.cs
- SettingsProviderCollection.cs
- InspectionWorker.cs
- StorageSetMapping.cs
- BindingBase.cs
- RunClient.cs
- TableLayoutSettingsTypeConverter.cs
- SkipStoryboardToFill.cs
- ServiceModelExtensionElement.cs
- TriggerBase.cs
- CorrelationResolver.cs
- StrongNamePublicKeyBlob.cs
- DataServiceHost.cs
- ConcurrentQueue.cs