Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- ErrorWebPart.cs
- RoutedEventConverter.cs
- ToolStripPanel.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- SmiEventSink_DeferedProcessing.cs
- PrintController.cs
- ContentPlaceHolder.cs
- ItemsControl.cs
- XsltContext.cs
- SimpleRecyclingCache.cs
- DictionaryChange.cs
- ECDiffieHellman.cs
- ChildDocumentBlock.cs
- XamlWrappingReader.cs
- dataobject.cs
- RemotingConfiguration.cs
- SelectionEditingBehavior.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- _NegotiateClient.cs
- fixedPageContentExtractor.cs
- ConfigurationFileMap.cs
- EtwProvider.cs
- JobCollate.cs
- OwnerDrawPropertyBag.cs
- Point3DIndependentAnimationStorage.cs
- ByteRangeDownloader.cs
- CmsInterop.cs
- XmlSerializer.cs
- UpdateManifestForBrowserApplication.cs
- WindowsSolidBrush.cs
- GatewayIPAddressInformationCollection.cs
- LookupBindingPropertiesAttribute.cs
- Roles.cs
- TextServicesCompartmentEventSink.cs
- GlyphElement.cs
- Internal.cs
- EntityDataSource.cs
- RemoteWebConfigurationHostStream.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- IdnMapping.cs
- EventProviderBase.cs
- LinkLabelLinkClickedEvent.cs
- JulianCalendar.cs
- ClientOptions.cs
- PeerCustomResolverBindingElement.cs
- ScriptingScriptResourceHandlerSection.cs
- LambdaCompiler.Binary.cs
- ChoiceConverter.cs
- IIS7WorkerRequest.cs
- SByte.cs
- MulticastNotSupportedException.cs
- QuaternionConverter.cs
- TextCharacters.cs
- SafeFileMapViewHandle.cs
- ProjectionNode.cs
- SerialReceived.cs
- EdmSchemaError.cs
- EllipseGeometry.cs
- CheckoutException.cs
- TextWriterEngine.cs
- ElementInit.cs
- XsltSettings.cs
- DropShadowBitmapEffect.cs
- NavigationExpr.cs
- ConnectionManagementElementCollection.cs
- ProvidersHelper.cs
- MetadataWorkspace.cs
- Button.cs
- VSWCFServiceContractGenerator.cs
- SerializableAttribute.cs
- Common.cs
- WebServiceErrorEvent.cs
- CharKeyFrameCollection.cs
- AmbientLight.cs
- HtmlShim.cs
- OperandQuery.cs
- FlowLayout.cs
- XsltSettings.cs
- UnicastIPAddressInformationCollection.cs
- ModifierKeysValueSerializer.cs
- Image.cs
- ConnectionStringsSection.cs
- HtmlInputControl.cs
- ExtendedPropertyDescriptor.cs
- Item.cs
- CacheMode.cs
- RoutedEventConverter.cs
- PageFunction.cs
- SelectorAutomationPeer.cs
- DataGridViewCellValidatingEventArgs.cs
- ConstraintEnumerator.cs
- Variable.cs
- EntityParameter.cs
- XpsS0ValidatingLoader.cs
- ReachPrintTicketSerializer.cs
- DataServiceQueryException.cs
- BinaryFormatterSinks.cs
- EventLogPermissionEntry.cs
- DesignerDataView.cs
- GridItemPattern.cs