Code:
/ FX-1434 / FX-1434 / 1.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
- DataGridColumnCollectionEditor.cs
- HttpListenerRequestUriBuilder.cs
- SingleConverter.cs
- SemaphoreFullException.cs
- CacheChildrenQuery.cs
- CounterSampleCalculator.cs
- SqlRecordBuffer.cs
- ClientRoleProvider.cs
- ReceiveActivityDesigner.cs
- RectAnimationUsingKeyFrames.cs
- DynamicPropertyReader.cs
- DropDownList.cs
- CaseKeyBox.ViewModel.cs
- FunctionNode.cs
- ParameterCollectionEditor.cs
- LogExtent.cs
- ClientScriptManager.cs
- HtmlDocument.cs
- TransformConverter.cs
- RemoveFromCollection.cs
- StringExpressionSet.cs
- DataGridViewCellPaintingEventArgs.cs
- SerializationTrace.cs
- ComPersistableTypeElementCollection.cs
- BezierSegment.cs
- WebPartUtil.cs
- WebZone.cs
- DisposableCollectionWrapper.cs
- TextLineResult.cs
- DataViewManager.cs
- TimelineCollection.cs
- ArgumentException.cs
- DbParameterCollectionHelper.cs
- WindowsFormsHost.cs
- Encoding.cs
- RenamedEventArgs.cs
- DelegateHelpers.Generated.cs
- EntityCollectionChangedParams.cs
- DesignerGenericWebPart.cs
- UnsafeNetInfoNativeMethods.cs
- MenuItem.cs
- SafeViewOfFileHandle.cs
- SizeAnimationClockResource.cs
- NativeMethods.cs
- TaiwanCalendar.cs
- WebZone.cs
- RadioButton.cs
- DataRelationPropertyDescriptor.cs
- XmlEnumAttribute.cs
- DynamicPropertyReader.cs
- Currency.cs
- ObjectSpanRewriter.cs
- DeviceSpecificChoiceCollection.cs
- DoubleAnimationUsingPath.cs
- PolicyException.cs
- PolyLineSegment.cs
- DataServiceHostFactory.cs
- BitConverter.cs
- AjaxFrameworkAssemblyAttribute.cs
- EdmType.cs
- ComponentResourceKeyConverter.cs
- KeyValueInternalCollection.cs
- RawStylusInputCustomData.cs
- IntegrationExceptionEventArgs.cs
- RouteItem.cs
- TabControlToolboxItem.cs
- MasterPageParser.cs
- TextServicesCompartment.cs
- ListViewUpdateEventArgs.cs
- Cloud.cs
- ConnectionStringEditor.cs
- DbDataRecord.cs
- XmlDigitalSignatureProcessor.cs
- TargetException.cs
- StringArrayConverter.cs
- Roles.cs
- NameValueConfigurationElement.cs
- ListViewTableRow.cs
- FtpWebRequest.cs
- HMACSHA256.cs
- ReferenceEqualityComparer.cs
- ProcessStartInfo.cs
- SystemException.cs
- RowVisual.cs
- ApplicationInfo.cs
- TextLine.cs
- Crc32.cs
- MainMenu.cs
- PerformanceCounterCategory.cs
- dbenumerator.cs
- MsmqReceiveHelper.cs
- CompilationSection.cs
- SQLGuid.cs
- ObjectViewListener.cs
- TabletDeviceInfo.cs
- _SslState.cs
- PresentationTraceSources.cs
- EmptyQuery.cs
- shaperfactoryquerycachekey.cs
- OdbcConnectionHandle.cs