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
- TreeViewHitTestInfo.cs
- PackagePartCollection.cs
- ProjectionPlanCompiler.cs
- BinarySerializer.cs
- RightNameExpirationInfoPair.cs
- HostAdapter.cs
- MetadataCache.cs
- WebBrowserHelper.cs
- NetworkCredential.cs
- ValidationRuleCollection.cs
- MissingFieldException.cs
- Shared.cs
- Configuration.cs
- SingleResultAttribute.cs
- DescriptionAttribute.cs
- HoistedLocals.cs
- CultureInfoConverter.cs
- LinearGradientBrush.cs
- TreeNode.cs
- ZoneMembershipCondition.cs
- DbConnectionPool.cs
- TimeSpanSecondsConverter.cs
- _ListenerResponseStream.cs
- DynamicQueryStringParameter.cs
- ProxyWebPartConnectionCollection.cs
- _HTTPDateParse.cs
- FixedHyperLink.cs
- DetailsViewPagerRow.cs
- DecoderExceptionFallback.cs
- AmbiguousMatchException.cs
- WindowsListView.cs
- TitleStyle.cs
- ExpressionEditorAttribute.cs
- BasePropertyDescriptor.cs
- SqlConnectionPoolProviderInfo.cs
- InputReferenceExpression.cs
- MD5.cs
- ElementNotAvailableException.cs
- SerializationAttributes.cs
- DefaultTextStore.cs
- Axis.cs
- TdsRecordBufferSetter.cs
- ScaleTransform.cs
- NodeLabelEditEvent.cs
- SqlDataSourceSelectingEventArgs.cs
- MaterialGroup.cs
- LinqDataSourceView.cs
- TraceSource.cs
- SortFieldComparer.cs
- PageAsyncTask.cs
- DataFieldConverter.cs
- ParallelTimeline.cs
- ContentTextAutomationPeer.cs
- KnownColorTable.cs
- ReadOnlyActivityGlyph.cs
- ImportedPolicyConversionContext.cs
- View.cs
- HostDesigntimeLicenseContext.cs
- SpanIndex.cs
- TcpHostedTransportConfiguration.cs
- CompositeScriptReference.cs
- HttpCachePolicy.cs
- SchemaNotation.cs
- AssertFilter.cs
- WindowsGraphicsWrapper.cs
- RequiredAttributeAttribute.cs
- Int32RectConverter.cs
- FtpWebRequest.cs
- StreamUpgradeProvider.cs
- ResizeGrip.cs
- EDesignUtil.cs
- DataGridViewRowHeaderCell.cs
- GetLedgerEntryForRecipientRequest.cs
- FixedFindEngine.cs
- FieldNameLookup.cs
- EUCJPEncoding.cs
- GridViewColumnHeaderAutomationPeer.cs
- HtmlTable.cs
- AdjustableArrowCap.cs
- SecureEnvironment.cs
- ForeignKeyConstraint.cs
- SmtpDigestAuthenticationModule.cs
- RectAnimation.cs
- SystemFonts.cs
- XmlTextReaderImpl.cs
- RuntimeResourceSet.cs
- UnionQueryOperator.cs
- MarkupCompiler.cs
- RectangleHotSpot.cs
- SdlChannelSink.cs
- AttributedMetaModel.cs
- BindingSourceDesigner.cs
- UshortList2.cs
- WebPartCloseVerb.cs
- SafeProcessHandle.cs
- ErrorTableItemStyle.cs
- QilDataSource.cs
- QilUnary.cs
- SmtpFailedRecipientsException.cs
- TargetException.cs