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
- RepeaterItemEventArgs.cs
- _SpnDictionary.cs
- PrimitiveDataContract.cs
- DataGridViewCellParsingEventArgs.cs
- RelationshipManager.cs
- SemanticValue.cs
- WmlLinkAdapter.cs
- SafeSystemMetrics.cs
- CqlParser.cs
- CryptoStream.cs
- EntityContainerEmitter.cs
- DecoderBestFitFallback.cs
- ErrorsHelper.cs
- ScriptingSectionGroup.cs
- RuleRefElement.cs
- UpdateExpressionVisitor.cs
- safesecurityhelperavalon.cs
- EnvelopedSignatureTransform.cs
- AssemblyGen.cs
- BufferedOutputStream.cs
- StyleSelector.cs
- XslTransform.cs
- RSAOAEPKeyExchangeFormatter.cs
- XamlFigureLengthSerializer.cs
- BooleanFunctions.cs
- GenericUI.cs
- ListViewDeleteEventArgs.cs
- FormClosedEvent.cs
- HttpDictionary.cs
- SByteConverter.cs
- ConfigDefinitionUpdates.cs
- XPathDescendantIterator.cs
- ExtensionMethods.cs
- DocumentPageViewAutomationPeer.cs
- ActivityScheduledQuery.cs
- SubqueryRules.cs
- DnsPermission.cs
- ObjectDataSourceMethodEventArgs.cs
- OleDbPermission.cs
- HostingEnvironmentSection.cs
- OleDbFactory.cs
- TransactionFilter.cs
- SystemFonts.cs
- HandleRef.cs
- ContainerFilterService.cs
- GetWinFXPath.cs
- DeploymentSection.cs
- TableLayoutStyle.cs
- FlowDocumentReader.cs
- NullRuntimeConfig.cs
- OleServicesContext.cs
- ArithmeticException.cs
- ValidatingReaderNodeData.cs
- RegisteredExpandoAttribute.cs
- XPathNodeList.cs
- PolicyManager.cs
- RequestChannelBinder.cs
- ToggleButtonAutomationPeer.cs
- glyphs.cs
- CodeRemoveEventStatement.cs
- BitArray.cs
- TargetInvocationException.cs
- ProfessionalColorTable.cs
- DependencyPropertyConverter.cs
- TablePattern.cs
- TextSelection.cs
- XmlUnspecifiedAttribute.cs
- MimeTypePropertyAttribute.cs
- LingerOption.cs
- TimeStampChecker.cs
- VerticalAlignConverter.cs
- CorrelationManager.cs
- ExpressionBuilder.cs
- ComponentEditorForm.cs
- RadioButtonList.cs
- SqlDataReaderSmi.cs
- UserPreferenceChangedEventArgs.cs
- EntitySqlQueryCacheEntry.cs
- XmlSignificantWhitespace.cs
- VariableQuery.cs
- PropertyEmitterBase.cs
- SystemIPv6InterfaceProperties.cs
- Knowncolors.cs
- BatchServiceHost.cs
- EntitySetDataBindingList.cs
- ListControl.cs
- OnOperation.cs
- ContextProperty.cs
- RC2.cs
- ProfilePropertySettingsCollection.cs
- RoleManagerModule.cs
- SchemaElementLookUpTableEnumerator.cs
- _NegoState.cs
- SetUserLanguageRequest.cs
- ConfigXmlComment.cs
- TcpTransportElement.cs
- SchemaConstraints.cs
- DataSourceCacheDurationConverter.cs
- DesignerCategoryAttribute.cs
- ValidationSettings.cs