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
- Propagator.Evaluator.cs
- OdbcError.cs
- DictionaryContent.cs
- UrlPath.cs
- XmlSchemaObject.cs
- RemotingException.cs
- GridViewColumnHeaderAutomationPeer.cs
- FilteredAttributeCollection.cs
- HideDisabledControlAdapter.cs
- ButtonBaseAdapter.cs
- ScriptResourceHandler.cs
- TextTreeDeleteContentUndoUnit.cs
- DrawTreeNodeEventArgs.cs
- HotSpotCollection.cs
- EmptyReadOnlyDictionaryInternal.cs
- ZipFileInfo.cs
- ViewEvent.cs
- IgnorePropertiesAttribute.cs
- ObjectDataSourceEventArgs.cs
- CachedPathData.cs
- XmlNamespaceManager.cs
- RoamingStoreFileUtility.cs
- CodeTypeParameter.cs
- AxisAngleRotation3D.cs
- DataViewManagerListItemTypeDescriptor.cs
- InternalsVisibleToAttribute.cs
- WindowsGraphics2.cs
- SystemPens.cs
- FactoryId.cs
- BitmapPalettes.cs
- UshortList2.cs
- FlatButtonAppearance.cs
- CellTreeNodeVisitors.cs
- AssociatedControlConverter.cs
- Column.cs
- VersionPair.cs
- TextSegment.cs
- GridViewRowPresenter.cs
- RuntimeEnvironment.cs
- HorizontalAlignConverter.cs
- WebPartTransformer.cs
- PipeSecurity.cs
- SchemaConstraints.cs
- PasswordTextContainer.cs
- WebServiceTypeData.cs
- ClientBuildManagerCallback.cs
- List.cs
- ResolveCompletedEventArgs.cs
- QueryCacheKey.cs
- Permission.cs
- ScaleTransform.cs
- SamlConditions.cs
- CorrelationResolver.cs
- ContainerUtilities.cs
- Convert.cs
- InternalPermissions.cs
- ObjectCloneHelper.cs
- Content.cs
- ExtentKey.cs
- MailMessageEventArgs.cs
- x509store.cs
- ImageIndexConverter.cs
- Tag.cs
- HttpGetClientProtocol.cs
- ErasingStroke.cs
- PageRequestManager.cs
- DefaultPrintController.cs
- CapabilitiesAssignment.cs
- CreateRefExpr.cs
- CodeDomSerializerException.cs
- DataGridRelationshipRow.cs
- GlobalizationAssembly.cs
- ParameterElementCollection.cs
- InternalEnumValidator.cs
- EventSinkHelperWriter.cs
- CompositeTypefaceMetrics.cs
- ProgressPage.cs
- LocalizableAttribute.cs
- ImageDrawing.cs
- BridgeDataReader.cs
- ItemCollection.cs
- RuntimeDelegateArgument.cs
- ConfigurationException.cs
- MissingFieldException.cs
- WebPartConnectionsCloseVerb.cs
- CheckPair.cs
- EventMap.cs
- WebPartConnectionsDisconnectVerb.cs
- TimeZone.cs
- Version.cs
- GcHandle.cs
- HttpListenerContext.cs
- ValidationRuleCollection.cs
- DataGridCellsPresenter.cs
- PageCodeDomTreeGenerator.cs
- ObjectSelectorEditor.cs
- CacheSection.cs
- _UncName.cs
- SettingsPropertyNotFoundException.cs
- HtmlShim.cs