Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ProgressBarAutomationPeer.cs
- IPGlobalProperties.cs
- LocatorGroup.cs
- RegexRunner.cs
- StandardBindingElement.cs
- VisualStateChangedEventArgs.cs
- WebBrowserNavigatingEventHandler.cs
- BasicExpressionVisitor.cs
- WindowVisualStateTracker.cs
- Part.cs
- TableAdapterManagerMethodGenerator.cs
- EndPoint.cs
- GridViewEditEventArgs.cs
- CharStorage.cs
- XappLauncher.cs
- WebChannelFactory.cs
- ManipulationDelta.cs
- SecureUICommand.cs
- MemberBinding.cs
- ImageList.cs
- GraphicsState.cs
- CollectionViewGroupRoot.cs
- SignatureToken.cs
- Style.cs
- WhitespaceRuleReader.cs
- EncryptedKeyIdentifierClause.cs
- ItemCheckedEvent.cs
- QuaternionRotation3D.cs
- TextParagraphView.cs
- FileVersion.cs
- DSACryptoServiceProvider.cs
- UInt16Storage.cs
- XmlElementAttributes.cs
- XmlDataLoader.cs
- GACIdentityPermission.cs
- ConfigurationStrings.cs
- Pkcs7Signer.cs
- _IPv6Address.cs
- TextSegment.cs
- ProtocolsConfiguration.cs
- DesignerCategoryAttribute.cs
- HiddenFieldPageStatePersister.cs
- EntityClassGenerator.cs
- DataFormats.cs
- LocatorPart.cs
- DefaultAuthorizationContext.cs
- DocumentApplicationJournalEntry.cs
- StylusEventArgs.cs
- Fx.cs
- FrameworkElement.cs
- InheritanceContextChangedEventManager.cs
- TimeoutValidationAttribute.cs
- WebAdminConfigurationHelper.cs
- bidPrivateBase.cs
- GenericParameterDataContract.cs
- IndentTextWriter.cs
- EntitySqlException.cs
- TimeSpanMinutesConverter.cs
- UnionCqlBlock.cs
- ComPlusServiceLoader.cs
- TableLayoutSettingsTypeConverter.cs
- PlainXmlWriter.cs
- CompilerGeneratedAttribute.cs
- XmlSchemaIdentityConstraint.cs
- KeyedHashAlgorithm.cs
- mansign.cs
- BindUriHelper.cs
- MouseEvent.cs
- UpdatePanelTrigger.cs
- UDPClient.cs
- LabelTarget.cs
- FileEnumerator.cs
- ViewStateModeByIdAttribute.cs
- DataGridViewCellStyleChangedEventArgs.cs
- RenderData.cs
- ParameterBuilder.cs
- TripleDES.cs
- CompilerScope.Storage.cs
- SimpleMailWebEventProvider.cs
- ProviderIncompatibleException.cs
- Crc32.cs
- NameValueSectionHandler.cs
- RestHandlerFactory.cs
- Main.cs
- ClientBuildManagerCallback.cs
- HtmlShim.cs
- FormClosedEvent.cs
- InheritanceContextChangedEventManager.cs
- StdRegProviderWrapper.cs
- Model3DGroup.cs
- CriticalHandle.cs
- SafeRegistryHandle.cs
- ServiceCredentials.cs
- MediaTimeline.cs
- ConditionBrowserDialog.cs
- NullRuntimeConfig.cs
- ApplicationDirectory.cs
- RequestNavigateEventArgs.cs
- WriterOutput.cs
- VisualStyleInformation.cs