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
- UIElementAutomationPeer.cs
- FormCollection.cs
- CompareInfo.cs
- FileSystemWatcher.cs
- LinqDataSourceDeleteEventArgs.cs
- CalendarDataBindingHandler.cs
- CngAlgorithm.cs
- RadioButton.cs
- FormsAuthenticationCredentials.cs
- DrawItemEvent.cs
- AssemblyCollection.cs
- ItemList.cs
- altserialization.cs
- DependsOnAttribute.cs
- Attributes.cs
- SQLDecimalStorage.cs
- HandledEventArgs.cs
- ThreadSafeList.cs
- InputLanguageProfileNotifySink.cs
- MailBnfHelper.cs
- IntegerFacetDescriptionElement.cs
- FrameworkContentElement.cs
- SchemaObjectWriter.cs
- XmlSerializerFactory.cs
- CallbackHandler.cs
- UserNameSecurityTokenAuthenticator.cs
- SQLMoneyStorage.cs
- DayRenderEvent.cs
- ActivitiesCollection.cs
- ExceptionValidationRule.cs
- XmlILOptimizerVisitor.cs
- FileDialog.cs
- MetadataItemSerializer.cs
- OperandQuery.cs
- MimeWriter.cs
- SecurityException.cs
- CheckBoxPopupAdapter.cs
- SessionPageStateSection.cs
- ToolConsole.cs
- FlowNode.cs
- MailDefinition.cs
- RemotingHelper.cs
- DataGridViewComboBoxColumn.cs
- RadioButton.cs
- CipherData.cs
- XpsDigitalSignature.cs
- SoapAttributeOverrides.cs
- StringDictionaryEditor.cs
- COM2Enum.cs
- WebPartUserCapability.cs
- WpfWebRequestHelper.cs
- PageSetupDialog.cs
- MaterializeFromAtom.cs
- ProxyGenerationError.cs
- PageCatalogPart.cs
- controlskin.cs
- HtmlInputButton.cs
- ValidatorCollection.cs
- DropShadowBitmapEffect.cs
- JsonServiceDocumentSerializer.cs
- XmlUtil.cs
- UdpDiscoveryMessageFilter.cs
- DbConnectionOptions.cs
- Control.cs
- _UncName.cs
- DrawingState.cs
- IsolatedStorageFileStream.cs
- LongValidator.cs
- CaseInsensitiveHashCodeProvider.cs
- WebServiceBindingAttribute.cs
- EmptyEnumerator.cs
- CharacterBufferReference.cs
- FileAuthorizationModule.cs
- XmlBufferReader.cs
- infer.cs
- QuotaThrottle.cs
- GestureRecognizer.cs
- CollectionViewGroupInternal.cs
- SelectedCellsCollection.cs
- HostExecutionContextManager.cs
- SqlDataReaderSmi.cs
- AtomParser.cs
- KeyManager.cs
- PeekCompletedEventArgs.cs
- ObjectListComponentEditor.cs
- DataPointer.cs
- CodeArgumentReferenceExpression.cs
- HierarchicalDataBoundControl.cs
- FixUpCollection.cs
- WebReferencesBuildProvider.cs
- AnimationLayer.cs
- PropertyAccessVisitor.cs
- TransformerInfo.cs
- DataGridViewImageCell.cs
- RefType.cs
- SafeSecurityHandles.cs
- SystemIPInterfaceStatistics.cs
- Fault.cs
- UseLicense.cs
- ComplusEndpointConfigContainer.cs