Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WinForms / System / WinForms / Design / Behavior / Adorner.cs / 1 / Adorner.cs
namespace System.Windows.Forms.Design.Behavior { using System; using System.Collections; using System.ComponentModel; using System.ComponentModel.Design; using System.Design; using System.Diagnostics; using System.Drawing; using System.Windows.Forms.Design; ////// /// An Adorner manages a collection of UI-related Glyphs. Each Adorner /// can be enabled/disabled. Only Enabled Adorners will receive hit test /// and paint messages from the BehaviorService. An Adorner can be viewed /// as a proxy between UI-related elements (all Glyphs) and the BehaviorService. /// public sealed class Adorner { private BehaviorService behaviorService;//ptr back to the BehaviorService private GlyphCollection glyphs;//collection of Glyphs that this particular Adorner manages private bool enabled;//enabled value - determines if Adorner gets paints & hits ////// /// Standard constructor. Creates a new GlyphCollection and by default is enabled. /// public Adorner() { glyphs = new GlyphCollection(); enabled = true; } ////// /// When an Adorner is added to the BehaviorService's AdornerCollection, the collection /// will set this property so that the Adorner can call back to the BehaviorService. /// public BehaviorService BehaviorService { get { return behaviorService; } set { this.behaviorService = value; } } ////// /// Determines if the BehaviorService will send HitTest and Paint messages to /// the Adorner. /// public bool Enabled { get { return enabled; } set { if (value != enabled) { enabled = value; Invalidate(); } } } ////// /// Returns the stronly-typed Glyph collection. /// public GlyphCollection Glyphs { get { return glyphs; } } ////// /// Forces the BehaviorService to refresh its AdornerWindow. /// public void Invalidate() { if (behaviorService != null) { behaviorService.Invalidate(); } } ////// /// Forces the BehaviorService to refresh its AdornerWindow within the given Rectangle. /// public void Invalidate(Rectangle rectangle) { if (behaviorService != null) { behaviorService.Invalidate(rectangle); } } ////// /// Forces the BehaviorService to refresh its AdornerWindow within the given Region. /// public void Invalidate(Region region) { if (behaviorService != null) { behaviorService.Invalidate(region); } } } } // 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
- DataMemberListEditor.cs
- ContainerActivationHelper.cs
- TreeNodeBindingDepthConverter.cs
- VisualStyleInformation.cs
- ResXResourceReader.cs
- ReadOnlyDictionary.cs
- TableDetailsRow.cs
- Delegate.cs
- SerializerProvider.cs
- HttpApplicationFactory.cs
- ValidatedControlConverter.cs
- TraceContext.cs
- ZoneLinkButton.cs
- SqlGatherProducedAliases.cs
- PngBitmapEncoder.cs
- PagesChangedEventArgs.cs
- QilScopedVisitor.cs
- WebPartDisplayModeCollection.cs
- SortKey.cs
- IEnumerable.cs
- cache.cs
- WebPartEditVerb.cs
- QueryModel.cs
- PrintControllerWithStatusDialog.cs
- ValidationSummary.cs
- CoreSwitches.cs
- BooleanStorage.cs
- safemediahandle.cs
- OperationAbortedException.cs
- X509CertificateValidator.cs
- XmlEventCache.cs
- NameValueSectionHandler.cs
- PointAnimationUsingPath.cs
- LogExtent.cs
- COM2ComponentEditor.cs
- ConnectionPoolRegistry.cs
- HttpDictionary.cs
- ServiceBusyException.cs
- ZoneButton.cs
- ParameterRetriever.cs
- Figure.cs
- CommandEventArgs.cs
- ToolStripPanelCell.cs
- ModifierKeysConverter.cs
- XmlDocumentType.cs
- ResourceAssociationType.cs
- XmlArrayAttribute.cs
- RegionInfo.cs
- RawStylusInputCustomData.cs
- SqlParameterCollection.cs
- SrgsRulesCollection.cs
- EncryptedKey.cs
- TextElementEditingBehaviorAttribute.cs
- SmiMetaDataProperty.cs
- RowType.cs
- ConfigurationLocationCollection.cs
- LinqDataSourceStatusEventArgs.cs
- MessageSmuggler.cs
- PropertyEntry.cs
- OdbcTransaction.cs
- ConfigurationProperty.cs
- GenericEnumConverter.cs
- TcpChannelHelper.cs
- ScrollContentPresenter.cs
- UdpChannelFactory.cs
- NonceToken.cs
- DbParameterCollectionHelper.cs
- DataBindingHandlerAttribute.cs
- QilPatternFactory.cs
- CompilationUnit.cs
- ArrayItemReference.cs
- AstTree.cs
- CopyOnWriteList.cs
- TextBoxAutomationPeer.cs
- ViewStateException.cs
- PassportAuthenticationModule.cs
- SqlUdtInfo.cs
- ToolStripGripRenderEventArgs.cs
- ReadOnlyHierarchicalDataSource.cs
- VirtualPathUtility.cs
- ImageFormat.cs
- SecurityHeader.cs
- PrimitiveType.cs
- StorageScalarPropertyMapping.cs
- AddressUtility.cs
- ComplexBindingPropertiesAttribute.cs
- ToolStripDesignerUtils.cs
- OleDbTransaction.cs
- NaturalLanguageHyphenator.cs
- StringWriter.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- SafePEFileHandle.cs
- ListViewTableCell.cs
- CodePageUtils.cs
- MsmqOutputMessage.cs
- MenuBindingsEditor.cs
- SqlClientWrapperSmiStream.cs
- ChangeProcessor.cs
- QueueProcessor.cs
- HelpKeywordAttribute.cs