Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- MatrixValueSerializer.cs
- BoundingRectTracker.cs
- DataServiceKeyAttribute.cs
- ClientConvert.cs
- TreeBuilder.cs
- reliableinputsessionchannel.cs
- InstanceStoreQueryResult.cs
- ListViewItemMouseHoverEvent.cs
- XPathScanner.cs
- DataGridViewCellCancelEventArgs.cs
- AddInSegmentDirectoryNotFoundException.cs
- CellCreator.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SystemDiagnosticsSection.cs
- TextBlock.cs
- PasswordDeriveBytes.cs
- PartitionedStream.cs
- MouseActionConverter.cs
- FontNamesConverter.cs
- HttpStreamXmlDictionaryReader.cs
- MachineKeyValidationConverter.cs
- RawMouseInputReport.cs
- EventWaitHandleSecurity.cs
- SqlClientPermission.cs
- TextRange.cs
- TraceListener.cs
- BuildManager.cs
- ThreadExceptionEvent.cs
- SafeIUnknown.cs
- Rectangle.cs
- InternalCache.cs
- CodeTypeMember.cs
- DictionaryEntry.cs
- TextInfo.cs
- SqlTrackingQuery.cs
- OpacityConverter.cs
- ComponentCollection.cs
- AssemblyNameProxy.cs
- MatrixAnimationBase.cs
- GZipStream.cs
- WSHttpBindingBaseElement.cs
- FieldNameLookup.cs
- DockPanel.cs
- PasswordTextContainer.cs
- BinaryReader.cs
- WebPartAddingEventArgs.cs
- DataGridViewAdvancedBorderStyle.cs
- ClientSettingsSection.cs
- DesignerDataSourceView.cs
- BindableTemplateBuilder.cs
- GridViewCommandEventArgs.cs
- BitmapEffectInput.cs
- HtmlTableRow.cs
- HttpListenerResponse.cs
- FrameSecurityDescriptor.cs
- SpnegoTokenProvider.cs
- PolicyStatement.cs
- ListManagerBindingsCollection.cs
- UriTemplateLiteralPathSegment.cs
- UpDownBase.cs
- Matrix3DConverter.cs
- DecoderExceptionFallback.cs
- PropertyChangedEventArgs.cs
- PageBuildProvider.cs
- QueryCacheKey.cs
- DoubleLinkListEnumerator.cs
- TileBrush.cs
- DataGridColumnCollection.cs
- AlphaSortedEnumConverter.cs
- ConnectionInterfaceCollection.cs
- SoapProtocolReflector.cs
- XmlSiteMapProvider.cs
- Track.cs
- HttpValueCollection.cs
- baseaxisquery.cs
- MenuItem.cs
- OracleCommandSet.cs
- DecoderFallback.cs
- OdbcInfoMessageEvent.cs
- AutoResetEvent.cs
- ImportContext.cs
- DLinqAssociationProvider.cs
- ControlBuilder.cs
- ValidatedMobileControlConverter.cs
- StorageInfo.cs
- RepeatBehaviorConverter.cs
- GridViewRowPresenter.cs
- HScrollBar.cs
- GridViewCancelEditEventArgs.cs
- DuplexChannelFactory.cs
- SingleStorage.cs
- SQLBinaryStorage.cs
- ChineseLunisolarCalendar.cs
- InlineObject.cs
- AssemblyFilter.cs
- PersonalizationProviderCollection.cs
- BounceEase.cs
- ButtonField.cs
- MouseGestureConverter.cs