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
- ToolTipAutomationPeer.cs
- X509Certificate2Collection.cs
- WmfPlaceableFileHeader.cs
- FolderBrowserDialog.cs
- DigestTraceRecordHelper.cs
- XmlElementAttributes.cs
- DrawingServices.cs
- QueryCacheEntry.cs
- ListViewPagedDataSource.cs
- TargetControlTypeAttribute.cs
- RegexCaptureCollection.cs
- RuntimeConfigurationRecord.cs
- IriParsingElement.cs
- SystemIcmpV6Statistics.cs
- ErrorProvider.cs
- OrderedDictionary.cs
- XamlSerializer.cs
- DrawingContextWalker.cs
- IPGlobalProperties.cs
- WarningException.cs
- FolderBrowserDialog.cs
- MasterPageParser.cs
- RoutedPropertyChangedEventArgs.cs
- ToolStripItemRenderEventArgs.cs
- PathFigureCollection.cs
- WebSysDescriptionAttribute.cs
- ThemeableAttribute.cs
- DocComment.cs
- FocusTracker.cs
- StylusPoint.cs
- XPathQilFactory.cs
- NativeMethods.cs
- WorkflowServiceHostFactory.cs
- _DomainName.cs
- ListItem.cs
- LightweightCodeGenerator.cs
- SendKeys.cs
- CommandCollectionEditor.cs
- CommandLineParser.cs
- LinkedResource.cs
- InkCanvas.cs
- UnsafeNativeMethods.cs
- WebPartTransformer.cs
- CacheDict.cs
- IInstanceTable.cs
- BindingNavigator.cs
- RegisteredExpandoAttribute.cs
- FilteredDataSetHelper.cs
- TreeNodeBindingCollection.cs
- FormatterServices.cs
- XmlSerializationGeneratedCode.cs
- TextTreeRootNode.cs
- ErrorWrapper.cs
- AdornerLayer.cs
- HttpsHostedTransportConfiguration.cs
- CultureInfoConverter.cs
- Attributes.cs
- NullableIntSumAggregationOperator.cs
- ECDiffieHellmanCng.cs
- SchemaConstraints.cs
- SourceItem.cs
- HtmlContainerControl.cs
- HttpListenerContext.cs
- Int32Collection.cs
- X509Utils.cs
- SqlInternalConnection.cs
- ImageSourceConverter.cs
- BamlResourceContent.cs
- XmlReaderDelegator.cs
- StrongNameMembershipCondition.cs
- SqlInternalConnection.cs
- GeometryHitTestParameters.cs
- UInt32.cs
- DocumentSchemaValidator.cs
- LogEntryDeserializer.cs
- Pair.cs
- AdPostCacheSubstitution.cs
- ServicePoint.cs
- ProviderCollection.cs
- PolicyLevel.cs
- MsmqTransportElement.cs
- TextDecorationLocationValidation.cs
- BindUriHelper.cs
- EventLogPermission.cs
- Vector3DCollectionConverter.cs
- DiscoveryEndpointValidator.cs
- WebPartMinimizeVerb.cs
- IncrementalReadDecoders.cs
- ListBoxChrome.cs
- RequiredFieldValidator.cs
- DictionaryContent.cs
- AppModelKnownContentFactory.cs
- MessageSecurityVersion.cs
- MemoryPressure.cs
- Parameter.cs
- MetadataHelper.cs
- MethodBuilder.cs
- MarkupCompilePass2.cs
- CompositeDuplexBindingElement.cs
- Constant.cs