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
- XmlStreamNodeWriter.cs
- RSAOAEPKeyExchangeDeformatter.cs
- ExtensionMethods.cs
- WindowsAuthenticationModule.cs
- EventLogPermission.cs
- NetworkAddressChange.cs
- StoreContentChangedEventArgs.cs
- HtmlInputRadioButton.cs
- CultureTableRecord.cs
- EdmValidator.cs
- TranslateTransform.cs
- SafeNativeMethods.cs
- PackageRelationshipSelector.cs
- ProxyFragment.cs
- MailDefinition.cs
- ObjectViewQueryResultData.cs
- DataSourceCache.cs
- Padding.cs
- RequestDescription.cs
- ResourceReferenceExpression.cs
- FaultCallbackWrapper.cs
- Propagator.JoinPropagator.cs
- FusionWrap.cs
- XmlSerializerFactory.cs
- ExpressionCopier.cs
- DbFunctionCommandTree.cs
- InternalPolicyElement.cs
- RowToFieldTransformer.cs
- _UriSyntax.cs
- CodeAccessPermission.cs
- FileDialogCustomPlace.cs
- RenderingEventArgs.cs
- SHA384CryptoServiceProvider.cs
- DataGridViewButtonColumn.cs
- CurrencyManager.cs
- CompilationUnit.cs
- CorrelationRequestContext.cs
- XslTransform.cs
- XmlSchemaSequence.cs
- SchemaType.cs
- RectAnimationUsingKeyFrames.cs
- SymmetricCryptoHandle.cs
- ClientType.cs
- ResourcePermissionBase.cs
- Win32.cs
- XhtmlTextWriter.cs
- XPathEmptyIterator.cs
- mongolianshape.cs
- DbSetClause.cs
- NameScope.cs
- FlagsAttribute.cs
- PropertyEmitterBase.cs
- CreateParams.cs
- DecimalConstantAttribute.cs
- NonBatchDirectoryCompiler.cs
- UshortList2.cs
- EntityStoreSchemaGenerator.cs
- CodeNamespace.cs
- ReflectionTypeLoadException.cs
- GB18030Encoding.cs
- SqlDependency.cs
- RoutingBehavior.cs
- NavigationWindowAutomationPeer.cs
- Scheduling.cs
- BaseServiceProvider.cs
- SpeakCompletedEventArgs.cs
- TextServicesManager.cs
- ReadOnlyState.cs
- Listbox.cs
- KeyEvent.cs
- ListBoxItemWrapperAutomationPeer.cs
- UIElementCollection.cs
- DesignerActionHeaderItem.cs
- SqlCacheDependencySection.cs
- HttpDebugHandler.cs
- WebHttpSecurityModeHelper.cs
- AssociatedControlConverter.cs
- WrapperEqualityComparer.cs
- AppearanceEditorPart.cs
- TypeSystemHelpers.cs
- SectionUpdates.cs
- TextSimpleMarkerProperties.cs
- KeyValueConfigurationCollection.cs
- DataControlFieldCell.cs
- TraceFilter.cs
- bidPrivateBase.cs
- RSAPKCS1SignatureFormatter.cs
- TransformerTypeCollection.cs
- Error.cs
- XmlQualifiedNameTest.cs
- TextEditorTables.cs
- XPathException.cs
- GetIndexBinder.cs
- StringPropertyBuilder.cs
- NumberFormatInfo.cs
- XPathAxisIterator.cs
- HtmlInputSubmit.cs
- RetrieveVirtualItemEventArgs.cs
- _ListenerRequestStream.cs
- x509utils.cs